Extract Analyzer and Authorization package version and use it in Components nuspec.
#8825
This commit is contained in:
parent
84dce20789
commit
519ec839af
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
|
|
|
|||
|
|
@ -19,13 +19,25 @@
|
|||
<Reference Include="System.ComponentModel.Annotations" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="_GetNuspecDependencyPackageVersions">
|
||||
<MSBuild Targets="_GetPackageVersionInfo"
|
||||
BuildInParallel="$(BuildInParallel)"
|
||||
Projects="../../Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj;../../../Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_ProjectPathWithVersion" />
|
||||
</MSBuild>
|
||||
<ItemGroup>
|
||||
<NuspecProperty Include="@(_ProjectPathWithVersion->WithMetadataValue('PackageId', 'Microsoft.AspnetCore.Components.Analyzers')->'componentAnalyzerPackageVersion=%(PackageVersion)')" />
|
||||
<NuspecProperty Include="@(_ProjectPathWithVersion->WithMetadataValue('PackageId', 'Microsoft.AspnetCore.Authorization')->'authorizationPackageVersion=%(PackageVersion)')" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- Pack settings -->
|
||||
<PropertyGroup>
|
||||
<NuspecFile>Microsoft.AspNetCore.Components.nuspec</NuspecFile>
|
||||
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);_GetNuspecDependencyPackageVersions</GenerateNuspecDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<NuspecProperty Include="coherentPackageVersion=$(PackageVersion)" />
|
||||
<NuspecProperty Include="jsInteropPackageVersion=$(MicrosoftJSInteropPackageVersion)" />
|
||||
<NuspecProperty Include="systemComponentModelAnnotationsPackageVersion=$(SystemComponentModelAnnotationsPackageVersion)" />
|
||||
<NuspecProperty Include="outputPath=$(OutputPath)" />
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
$CommonMetadataElements$
|
||||
<dependencies>
|
||||
<group targetFramework=".NETStandard2.0">
|
||||
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$coherentPackageVersion$" />
|
||||
<dependency id="Microsoft.AspNetCore.Authorization" version="$coherentPackageVersion$" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$componentAnalyzerPackageVersion$" />
|
||||
<dependency id="Microsoft.AspNetCore.Authorization" version="$authorizationPackageVersion$" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.JSInterop" version="$jsInteropPackageVersion$" exclude="Build,Analyzers" />
|
||||
<dependency id="System.ComponentModel.Annotations" version="$systemComponentModelAnnotationsPackageVersion$" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
|
|
|
|||
Loading…
Reference in New Issue