You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nuget target silently skips Directory.Build.props, proceeds with stale version #825
The nuget target's built-in version bumper silently skips Directory.Build.props — the idiomatic SDK-style version file for multi-project .NET repos — and downgrades the failure to a warning, letting prepare continue with the stale version number.
From the craft prepare log in a real broken release (getsentry/[email protected]):
[info] Running automatic version bumping from targets...
[debug] Running version bump for target "nuget"...
[debug] dotnet-setversion not available, falling back to manual edit
[debug] Target "nuget" did not apply (detection failed)
[warn] Targets [nuget] support version bumping but did not find applicable
files in your project. Consider adding a preReleaseCommand if you
need custom version bumping.
The result: every .nupkg published to NuGet and attached to the GitHub release carried the previous version number (*.6.5.0.nupkg inside a 6.6.0 release). NuGet rejected the upload as duplicates of the existing packages, so nothing landed. The release had to be fully rolled back and re-cut.
Root cause — two compounding issues:
Directory.Build.props is not in the nuget target's recognized file list. The bumper falls back to dotnet-setversion, and when that CLI is absent, detection fails entirely.
Failure is downgraded to warn rather than error, so prepare continues and commits/tags with the wrong version.
Suggested fixes:
Add Directory.Build.props (and optionally Directory.Packages.props) to the nuget target's file detection so the built-in bumper works for SDK-style repos without requiring dotnet-setversion.
When version bump detection fails for a target that declares versioning support, treat it as a hard error and abort prepare rather than continuing.
Activity
fix(prepare)!: Fail when targets find no version to bump
fix(prepare)!: Fail when no target bumps the version, and bump nuget …