From eb5507d604276a04491f292b05896c81d05cf857 Mon Sep 17 00:00:00 2001 From: egortech Date: Tue, 18 Aug 2026 09:56:34 +0300 Subject: [PATCH] Fix Include Symbols when using dotnet pack with nuspec file (#55252) --- src/Cli/dotnet/Commands/Pack/PackCommand.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Cli/dotnet/Commands/Pack/PackCommand.cs b/src/Cli/dotnet/Commands/Pack/PackCommand.cs index b703c614c56f..1c7119492b72 100644 --- a/src/Cli/dotnet/Commands/Pack/PackCommand.cs +++ b/src/Cli/dotnet/Commands/Pack/PackCommand.cs @@ -121,6 +121,9 @@ public static int RunPackCommand(ParseResult parseResult) if (version != null) packArgs.Version = version.ToNormalizedString(); + if (parseResult.GetValue(definition.IncludeSymbolsOption)) + packArgs.Symbols = true; + var configuration = parseResult.GetValue(definition.ConfigurationOption) ?? "Debug"; packArgs.Properties["configuration"] = configuration;