Add RollForward to NuGet.Build.Tasks.Console #5125
Merged
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.
Bug
Fixes: #12528
Regression? Last working version: N/A
Description
Currently, NuGet.Build.Tasks.Console contains an executable which targets the .NET 5 runtime, so to use the package either the .NET 5 runtime (an EOL runtime) needs to be installed, or as the insertion process does the application is retargetted on the fly.
This change adds rollforward to the runtimeconfig so that the application is runnable on newer versions of the runtime. In theory, this makes the retargetting unnecessary, but I'm not proposing that process changes for now.
Note: for context, NuGet.Build.Tasks.Console is either told where to find dotnet explicitly, or it just looks two directories up for it. So this change just allows either of those to be newer runtimes and not just crash.
Additionally, the NuGet.Build.Tasks.Console package is used in the MSBuild boottrapper, which is a fundamental part of MSBuild's CI process (it builds, then uses the output to build itself again with the new bits). So this would bring that scenario a bit more inline with how it actually works in the SDK.
FYI @jeffkl with whom I discussed offline
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation