Fix NuGet package versioning for release pipeline v9.2.0 #316
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The release pipeline for version 9.2.0 was failing because the project lacked proper NuGet package versioning configuration. The pipeline defines version variables (
Major: 9,Minor: 2,Revision: 0) but these weren't being used during package generation, causing packages to be created with the default version1.0.0instead of9.2.0.Root Cause
The project file was missing essential NuGet package metadata properties, and an obsolete
package.nuspecfile contained outdated version information. Additionally, the Azure pipeline wasn't passing version parameters to thedotnet packcommand.Changes Made
Updated
Xunit.Microsoft.DependencyInjection.csproj:PackageId,Title,Authors,Company,Description,Copyright,PackageTags,PackageProjectUrl,PackageLicenseExpression, andPackageRequireLicenseAcceptance.nuspecfile by moving all metadata into the project fileRemoved obsolete
package.nuspec:Updated
azure-pipelines.yml:/p:PackageVersion=$(Major).$(Minor).$(Revision)parameter to the pack command to properly use pipeline version variablesVerification
The fix has been thoroughly tested:
The release pipeline should now correctly generate NuGet packages with version 9.2.0 and all required metadata.
Fixes #315.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.