Skip to content

Apply the version suffix before naming the symbols package - #7814

Merged
zivkan merged 1 commit into
NuGet:devfrom
AsadIqbal-Dev:dev-asadiqbal-symbols-suffix
Oct 27, 2026
Merged

zivkan merged 1 commit into
NuGet:devfrom
AsadIqbal-Dev:dev-asadiqbal-symbols-suffix

Conversation

@AsadIqbal-Dev

Copy link
Copy Markdown
Contributor

Bug

Fixes: NuGet/Home#3530

Description

nuget pack my.nuspec -Symbols -Suffix beta created X.1.0.0-beta.nupkg and X.1.0.0.symbols.nupkg, so the suffix was missing from the symbols package's file name. The version inside the symbols package was correct.

In PackCommandRunner.BuildSymbolsPackage, the output path was computed from the builder's version before InitCommonPackageBuilderProperties applied -Suffix (and -Version) to it. The main package doesn't have this problem because BuildFromNuspec calls InitCommonPackageBuilderProperties first. The two calls are now in the same order for the symbols package.

Test: RunPackageBuild_WithSymbolsAndSuffix_BothPackageFileNamesIncludeSuffix packs a nuspec with Symbols = true, Suffix = "beta". It checks both file names and the symbols package's version, and it fails on dev.

NuGet.Commands.Test tests with Pack in the name, on net10.0: 409 passed, 2 skipped.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

BuildSymbolsPackage computed the output path before InitCommonPackageBuilderProperties applied -Suffix, so the .symbols.nupkg file name had no suffix.

Fixes NuGet/Home#3530
@AsadIqbal-Dev
AsadIqbal-Dev requested a review from a team as a code owner October 22, 2026 21:38
@dotnet-policy-service dotnet-policy-service Bot added the Community PRs created by someone not in the NuGet team label Oct 22, 2026
@zivkan
zivkan merged commit 062cf04 into NuGet:dev Oct 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PRs created by someone not in the NuGet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuget.exe pack with both -symbols and -suffix give incorrect name to symbol package

3 participants