Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 7daa692

Browse files
committed
Pack nuget during Package target build only
If we PackOnBuild during build, the tasks get loaded and test or package can fail
1 parent 1fe7005 commit 7daa692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<RunCodeAnalysis Condition=" '$(RunCodeAnalysis)' == ''">false</RunCodeAnalysis>
1717
<IntermediateOutputPath>.nuget\</IntermediateOutputPath>
1818
<PackagesPath>$(IntermediateOutputPath)packages</PackagesPath>
19-
<CommonBuildProperties>WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackOnBuild=true;PackageOutputPath=$(Out)</CommonBuildProperties>
19+
<CommonBuildProperties>WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackageOutputPath=$(Out)</CommonBuildProperties>
2020
<DefaultImportance Condition=" '$(DefaultImportance)' == '' ">high</DefaultImportance>
2121
<PS>%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PS>
2222
</PropertyGroup>
@@ -49,7 +49,7 @@
4949

5050
<Target Name="Package" DependsOnTargets="Build">
5151
<MakeDir Directories="$(Out)" Condition="!Exists('$(Out)')" />
52-
<MSBuild Projects="@(PackProject)" Properties="$(CommonBuildProperties)" />
52+
<MSBuild Projects="@(PackProject)" Properties="$(CommonBuildProperties);PackOnBuild=true" />
5353
<ItemGroup>
5454
<OutputFile Include="$(Out)\*.nupkg" />
5555
<OutputFile Include="$(Out)\*.vsix" />

0 commit comments

Comments
 (0)