fix(csproj): add RollForward Major so the tool survives a runtime upgrade - #23
Merged
Conversation
…rade .NET tools are framework-dependent applications. Roll-forward handles patch and minor automatically but does not cross major version boundaries, so a tool built for one major refuses to start when only a newer major is installed. The user sees "You must install or update .NET to run this application" while a perfectly usable runtime is listed in the same error. Verified against mcr.microsoft.com/dotnet/sdk:10.0, which carries only the .NET 10 runtime. A net8.0 build of this tool failed with exit 150 without the property and ran correctly with it, crossing two majors. The property writes "rollForward": "Major" into runtimeconfig.json at pack time. This matters now, while we still target net8.0 through net10.0, for anyone already on .NET 11, and it matters more in November when .NET 8 and 9 go out of support and the tool becomes .NET 10 only. Refs #22 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The RollForward fix only reaches users through a new NuGet package. Without a bump the release job would pack 1.6.0, `dotnet nuget push --skip-duplicate` would silently skip it because 1.6.0 is already published, and tag-release would then fail because v1.6.0 resolves to an older commit than the one being released. Patch rather than minor: from a user's point of view the tool failed to start and now starts. No API or behaviour change beyond that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two commits: the fix, and the version bump it needs in order to ship.
The problem
.NET tools are framework-dependent applications. Roll-forward handles patch and minor versions automatically, but it does not cross major version boundaries.
So a user who installs
seedfoldertoday and later moves to a machine carrying only a newer major runtime gets this, with a perfectly usable runtime listed in the error text:Verified, not assumed
Tested against
mcr.microsoft.com/dotnet/sdk:10.0, which carries only the .NET 10 runtime. Anet8.0build of this tool is structurally the same case as anet10.0tool on a future .NET 11 box.RollForwardrollForwardkey<RollForward>Major</RollForward>"rollForward": "Major"--allow-roll-forwardrollForwardkeyConfirmed on this branch that the property reaches the build output:
{ "runtimeOptions": { "tfm": "net10.0", "rollForward": "Major", ... } }Why the version bump is here
Without it the fix would never reach anyone. Walking the release job:
dotnet packproducessolrevdev.seedfolder.1.6.0.nupkgdotnet nuget push --skip-duplicatesilently skips it, because 1.6.0 is already on NuGet, and still exits 0succeeded=trueis written, sotag-releaserunstag-releasefindsv1.6.0already on origin, resolving to an older commit than the one being released, and exits 1So the result would be a red build on master and no new package. Bumped to 1.6.1, which is unused on NuGet and has no existing tag. Confirmed
dotnet packnow producessolrevdev.seedfolder.1.6.1.nupkg.Patch rather than minor: from a user's point of view the tool failed to start and now starts.
Why now
It helps immediately for anyone already on .NET 11, even while we still multi-target
net8.0throughnet10.0. It matters more in November, when .NET 8 and .NET 9 both reach end of support and this becomes a .NET 10 only tool. At that point roll-forward is what keeps it alive between LTS releases.Backwards compatible. Refs #22. The blog post covering this is solrevdev/solrevdev.github.io#23.
🤖 Generated with Claude Code