[Workloads] Allow missing workload packs#9495
[Workloads] Allow missing workload packs#9495pjcollins wants to merge 1 commit intodotnet:release/6.0from
Conversation
|
After further discussion with @jonathanpeppers I've realized that we would still have an issue with VS insertions. There is no automatic way to install these SDK packs during a project build, and as a result I think we do need to figure out how to get them into VS in all cases. These changes may still be useful, but they won't fix everything for the Android scenario at least. |
|
I think we solve the VS insertion issue by keeping the existing .NET 6 workload authoring and components in VS when we go to insert .NET 7 workloads, instead of replacing them. I think this will still be a necessary change for us in that case. |
jonathanpeppers
left a comment
There was a problem hiding this comment.
I think this is probably the right change for now.
This is an example of a pack that wouldn't be found:
src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs
Outdated
Show resolved
Hide resolved
|
I'm good with this in principle since it does restore parity with what we previously had. I am curious though how these packs are being resolved. Are they produced separately from another build? |
These packs were produced by our .NET 6 branch and were already published to VS and NuGet.org. As far as Visual Studio is concerned the packs will already be inserted via https://devdiv.visualstudio.com/DevDiv/_git/VS?path=/.corext/Configs/dotnet-workloads-components.json&version=GBmain&_a=contents. Once we go to insert .NET 7 packs, I think we'll add a new |
8241088 to
4f34204
Compare
|
@mmitche as an FYI when we're ready to merge |
Commit f8c0d51 introduced a change that breaks MSI generation for the Android workload. Previously, workload packs that were declared in the WorkloadManifest.json but not present on disk would be skipped. The .NET 7 Android workload manifest [now declares SDK packs][0] that have already shipped in order to support .NET 6 projects. We do not want to regenerate MSI installers for these packs, and we should be able to continue shipping them in VS by keeping the .NET 6 workload authoring in VS alongside new .NET 7 workload authoring. A new `AllowMissingPacks` task parameter has been added to let workload owners skip MSI and setup authoring generation for packs that are not present when the tooling runs. [0]: https://github.com/xamarin/xamarin-android/blob/ac5bb6b910a5d9e72f38b9df4528dd308e5000d6/src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json#L45
4f34204 to
42d3211
Compare
|
@dsplaisted @joeloff I just fixed the conflict with the recent workload pack grouping changes. This is still working for me locally against a recent Android build (even with the new pack group parameters set), so I think it should be ready to merge? |
|
I'll close this, these changes are now in #9628. |
Commit f8c0d51 introduced a change that breaks MSI generation for the
Android workload. Previously, workload packs that were declared in the
WorkloadManifest.json but not present on disk would be skipped.
The .NET 7 Android workload manifest now declares SDK packs that
have already shipped in order to support .NET 6 projects. We do not
want to regenerate MSI installers for these packs, and we should be able
to continue shipping them in VS by keeping the .NET 6 workload authoring
in VS alongside new .NET 7 workload authoring.
A new
AllowMissingPackstask parameter has been added to let workloadowners skip MSI and setup authoring generation for packs that are not
present when the tooling runs.