This repository was archived by the owner on Jan 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/Build/NuGet.Build.Packaging.Tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ Copyright (c) .NET Foundation. All rights reserved.
3838
3939 <!-- Whether to emit the nuspec that's used to create the final package -->
4040 <EmitNuSpec Condition =" '$(EmitNuSpec)' == ''" >false</EmitNuSpec >
41- <NuspecFile Condition =" '$(NuspecFile)' == ''" >$(OutputPath)\$(PackageId).nuspec</NuspecFile >
41+ <!-- Only default the nuspec file if we are supposed to emit one. -->
42+ <NuspecFile Condition =" '$(NuspecFile)' == '' and '$(EmitNuSpec)' == 'true'" >$(OutputPath)\$(PackageId).nuspec</NuspecFile >
4243 </PropertyGroup >
4344
4445 <Import Project =" NuGet.Build.Packaging.Inference.targets" Condition =" '$(InferPackageContents)' != 'false'" />
@@ -373,9 +374,6 @@ Copyright (c) .NET Foundation. All rights reserved.
373374 -->
374375 <Target Name =" Pack" DependsOnTargets =" $(PackDependsOn)" Returns =" @(PackageTargetPath)" Condition =" '$(IsPackable)' == 'true'" >
375376 <MakeDir Directories =" $(PackageOutputPath)" Condition =" !Exists('$(PackageOutputPath)')" />
376- <PropertyGroup >
377- <NuspecFile Condition =" '$(EmitNuspec)' == 'true' And '$(NuspecFile)' == ''" >$(OutputPath)\$(PackageId).nuspec</NuspecFile >
378- </PropertyGroup >
379377 <CreatePackage Manifest =" @(PackageTargetPath)" NuspecFile =" $(NuspecFile)" Contents =" @(_PackageContent)" TargetPath =" @(PackageTargetPath->'%(FullPath)')" >
380378 <Output TaskParameter =" OutputPackage" ItemName =" _PackageTargetPath" />
381379 <Output TaskParameter =" OutputPackage" ItemName =" FileWrites" />
@@ -402,4 +400,4 @@ Copyright (c) .NET Foundation. All rights reserved.
402400 <Import Project =" NuGet.Build.Packaging.Authoring.targets" Condition =" '$(IsPackagingProject)' == 'true'" />
403401 <Import Project =" NuGet.Build.Packaging.CrossTargeting.targets" Condition =" '$(IsCrossTargetingBuild)' == 'true' And '$(FromPackagingProject)' == 'true'" />
404402 <Import Project =" NuGet.Build.Packaging.Legacy.targets" />
405- </Project >
403+ </Project >
You can’t perform that action at this time.
0 commit comments