From d94f163e5418686c0507caa808340453b9a1326a Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Fri, 22 Nov 2024 14:23:59 -0300 Subject: [PATCH] When running nugetize, never cleanup built packages This is typically unnecessary regardless of what setting users use for cleanup. --- src/dotnet-nugetize/Program.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dotnet-nugetize/Program.cs b/src/dotnet-nugetize/Program.cs index bdbd40ad..71d3b46a 100644 --- a/src/dotnet-nugetize/Program.cs +++ b/src/dotnet-nugetize/Program.cs @@ -72,8 +72,8 @@ int Run(string[] args) } // Built-in args we always pass to MSBuild - extra.AddRange(new[] - { + extra.AddRange( + [ // Avoids contention when writing to the dotnet-nugetize MSBuild items file "-m:1", // Enable retrieving source link info if supported by the project @@ -83,6 +83,8 @@ int Run(string[] args) "-p:EmitNuspec=true", // Never emit the actual pkg since that would be the same as just running dotnet pack "-p:EmitPackage=false", + // Never cleanup previously built packages + "-p:EnablePackCleanup=false", // Avoid SDK trying to validate the output package since we don't emit it "-p:EnablePackageValidation=false", // DTB arguments that speed-up the execution @@ -90,7 +92,7 @@ int Run(string[] args) "-p:DesignTimeBuild=true", "-p:DesignTimeSilentResolution=true", "-p:ResolveAssemblyReferencesSilent=true" - }); + ]); if (help) {