33 <ItemGroup >
44 <ThisAssemblyProjectProperty Include =" PackageId" />
55 </ItemGroup >
6-
6+
7+ <ItemDefinitionGroup >
8+ <Content >
9+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
10+ <Pack >true</Pack >
11+ </Content >
12+ </ItemDefinitionGroup >
13+
714 <PropertyGroup >
815 <PackageId >NuGet.Build.Packaging</PackageId >
9- <Authors >Microsoft</Authors >
10- <Owners >Microsoft</Owners >
11- <Copyright >© .NET Foundation. All rights reserved.</Copyright >
1216 <Title >NuGetizer-3000</Title >
1317 <Description >NuGet Packaging Targets</Description >
14- <NeutralLanguage >en</NeutralLanguage >
1518 <IsDevelopmentDependency >true</IsDevelopmentDependency >
16- <PackageLicenseUrl >https://raw.githubusercontent.com/NuGet/NuGet.Build.Packaging/dev/LICENSE.txt</PackageLicenseUrl >
17- <PackageProjectUrl >https://github.com/NuGet/NuGet.Build.Packaging</PackageProjectUrl >
19+ <PrimaryOutputKind >build</PrimaryOutputKind >
1820
19- <InferLegacyPackageReferences >false</InferLegacyPackageReferences >
20- <IncludeContentInPackage >false</IncludeContentInPackage >
21- <IncludeOutputsInPackage >false</IncludeOutputsInPackage >
22- <IncludeSymbolsInPackage >false</IncludeSymbolsInPackage >
23- <IncludeFrameworkReferencesInPackage >false</IncludeFrameworkReferencesInPackage >
21+ <PackOnBuild Condition =" '$(PackOnBuild)' == '' And '$(Configuration)' == 'Release'" >true</PackOnBuild >
22+ <PackageOutputPath Condition =" '$(PackageOutputPath)' == ''" >..\..\..\out</PackageOutputPath >
2423 </PropertyGroup >
2524
26- <Import Project =" $(OutputPath)NuGet.Build.Packaging.targets"
27- Condition=" '$(PackOnBuild)' == 'true' and Exists('$(OutputPath)NuGet.Build.Packaging.targets')" />
28-
25+ <Import Project =" $(OutputPath)NuGet.Build.Packaging.targets"
26+ Condition =" '$(PackOnBuild)' == 'true' and Exists('$(OutputPath)NuGet.Build.Packaging.targets')" />
27+
2928 <Target Name =" AddBuiltOutput" BeforeTargets =" GetPackageContents" DependsOnTargets =" AllProjectOutputGroups" Returns =" @(PackageFile)" >
30- <!-- Update packaging version targets -->
31- <PropertyGroup >
32- <XmlNs >< Namespace Prefix='msb' Uri='http://schemas.microsoft.com/developer/msbuild/2003'/> </XmlNs >
33- </PropertyGroup >
34- <XmlPoke Namespaces =" $(XmlNs)"
35- XmlInputPath =" $(OutputPath)NuGet.Build.Packaging.Version.props"
36- Query =" /msb:Project/msb:PropertyGroup/msb:PackagingTargetsVersion"
37- Value =" $(PackageVersion)" />
38-
3929 <ItemGroup >
4030 <PackageFile Include =" $(OutputPath)ApiIntersect.exe" >
4131 <PackagePath >build\ApiIntersect.exe</PackagePath >
5848 <PackageFile Include =" $(OutputPath)Mono.Options.dll" >
5949 <PackagePath >build\Mono.Options.dll</PackagePath >
6050 </PackageFile >
61- <PackageFile Include =" $(OutputPath)NuGet.Build.Packaging.Version.props" >
62- <PackagePath >build\NuGet.Build.Packaging.Version.props</PackagePath >
63- </PackageFile >
64- <PackageFile Include =" @(ContentWithTargetPath)" >
65- <PackagePath >build\%(ContentWithTargetPath.TargetPath)</PackagePath >
66- </PackageFile >
67- <PackageFile Include =" @(BuiltProjectOutputGroupOutput -> '%(FinalOutputPath)')" >
68- <PackagePath >build\%(Filename)%(Extension)</PackagePath >
69- </PackageFile >
70- <PackageFile Include =" @(DebugSymbolsProjectOutputGroupOutput -> '%(FinalOutputPath)')" >
71- <PackagePath >build\%(Filename)%(Extension)</PackagePath >
72- </PackageFile >
7351 </ItemGroup >
7452 </Target >
7553
54+ <Target Name =" UpdatePackagingVersion" BeforeTargets =" Pack" >
55+ <!-- Update packaging version targets -->
56+ <PropertyGroup >
57+ <XmlNs >< Namespace Prefix='msb' Uri='http://schemas.microsoft.com/developer/msbuild/2003'/> </XmlNs >
58+ </PropertyGroup >
59+ <XmlPoke Namespaces =" $(XmlNs)"
60+ XmlInputPath =" $(OutputPath)NuGet.Build.Packaging.Version.props"
61+ Query =" /msb:Project/msb:PropertyGroup/msb:PackagingTargetsVersion"
62+ Value =" $(PackageVersion)" />
63+ </Target >
64+
7665 <PropertyGroup >
7766 <CoreCompileDependsOn >
7867 PackageItemKind;
8978
9079 <Target Name =" GeneratePackageItemKind" Inputs =" $(MSBuildThisFileFullPath);NuGet.Build.Packaging.props" Outputs =" $(PackageItemKindFile)" >
9180 <MakeDir Directories =" $(IntermediateOutputPath)" Condition =" !Exists('$(IntermediateOutputPath)') " />
92- <MSBuild Projects =" NuGet.Build.Packaging.props" Targets =" _GetPackageItemKinds" >
93- <Output ItemName =" _PackageItemKind" TaskParameter =" TargetOutputs" />
81+ <MSBuild Projects =" NuGet.Build.Packaging.props" Targets =" _GetPackageItemKinds" >
82+ <Output ItemName =" _PackageItemKind" TaskParameter =" TargetOutputs" />
9483 </MSBuild >
9584
9685 <WriteLinesToFile Lines ='
@@ -115,5 +104,5 @@ namespace $(RootNamespace)
115104 <FileWrites Include =" $(PackageItemKindFile)" />
116105 </ItemGroup >
117106 </Target >
118-
107+
119108</Project >
0 commit comments