From 4aa4cbd110809bfbf76359ea88aab4435874e441 Mon Sep 17 00:00:00 2001 From: Brian Dukes Date: Tue, 13 Apr 2021 17:13:06 -0500 Subject: [PATCH 1/2] Produce snupkg format for NuGet --- Build/Tasks/CreateNugetPackages.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Build/Tasks/CreateNugetPackages.cs b/Build/Tasks/CreateNugetPackages.cs index 21baad83432..336a91f7753 100644 --- a/Build/Tasks/CreateNugetPackages.cs +++ b/Build/Tasks/CreateNugetPackages.cs @@ -11,8 +11,8 @@ namespace DotNetNuke.Build.Tasks using Cake.Common.IO; using Cake.Common.Tools.NuGet; using Cake.Common.Tools.NuGet.Pack; + using Cake.Core; using Cake.Frosting; - using DotNetNuke.Build; /// A cake task to create the platform's NuGet packages. @@ -35,6 +35,7 @@ public override void Run(Context context) IncludeReferencedProjects = true, Symbols = true, Properties = new Dictionary { { "Configuration", "Release" } }, + ArgumentCustomization = args => args.Append("-SymbolPackageFormat snupkg"), }; // loop through each nuspec file and create the package From f8ed3aca2997f8bca6fbbba7663b5ff6db0f1b51 Mon Sep 17 00:00:00 2001 From: Brian Dukes Date: Wed, 14 Apr 2021 08:55:24 -0500 Subject: [PATCH 2/2] Don't produce symbols package for DotNetNuke.WebApi Since this package doesn't include any source, it can't include symbols. --- Build/Tasks/CreateNugetPackages.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Build/Tasks/CreateNugetPackages.cs b/Build/Tasks/CreateNugetPackages.cs index 336a91f7753..faf0432e448 100644 --- a/Build/Tasks/CreateNugetPackages.cs +++ b/Build/Tasks/CreateNugetPackages.cs @@ -24,6 +24,7 @@ public override void Run(Context context) { // look for solutions and start building them var nuspecFiles = context.GetFiles("./Build/Tools/NuGet/*.nuspec"); + var noSymbolsNuspecFiles = context.GetFiles("./Build/Tools/NuGet/DotNetNuke.WebApi.nuspec"); context.Information("Found {0} nuspec files.", nuspecFiles.Count); @@ -38,13 +39,19 @@ public override void Run(Context context) ArgumentCustomization = args => args.Append("-SymbolPackageFormat snupkg"), }; - // loop through each nuspec file and create the package + nuspecFiles -= noSymbolsNuspecFiles; foreach (var spec in nuspecFiles) { - var specPath = spec.ToString(); + context.Information("Starting to pack: {0}", spec); + context.NuGetPack(spec.FullPath, nuGetPackSettings); + } - context.Information("Starting to pack: {0}", specPath); - context.NuGetPack(specPath, nuGetPackSettings); + nuGetPackSettings.Symbols = false; + nuGetPackSettings.ArgumentCustomization = null; + foreach (var spec in noSymbolsNuspecFiles) + { + context.Information("Starting to pack: {0}", spec); + context.NuGetPack(spec.FullPath, nuGetPackSettings); } } }