Fix workload set install folder Fixes #46312 #46351
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.
Fixes #46312
https://github.com/dotnet/sdk/pull/46351When we installed a workload set, we'd use the current SDK's feature band as part of the path, but if it was a workload set for a different feature band (as, for instance, installed via dotnet workload update --version x), then it would assume that workload set was in the feature band folder for the current feature band. Since the resolver is fairly precise with its expectations, it rejects this workload set.
In my dogfood folder, the correct location is:
C:\GitHub\sdkRelease\artifacts\bin\redist\Debug\dotnet\sdk-manifests\9.0.100\workloadsets\9.0.101
But using a 9.0.2xx SDK, it would install to:
C:\GitHub\sdkRelease\artifacts\bin\redist\Debug\dotnet\sdk-manifests\9.0.200\workloadsets\9.0.101
This switches to using the feature band from the workload set itself, resolving the issue.
Note that this was a FileBasedInstaller-specific problem. I verified that MSI-based installs were not affected, which incidentally means this better aligns to their behavior.