-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two workloads using the same pack cause MSBuildWorkloadSdkResolver to fail #16700
Comments
Different workload manifests can't declare the same workload pack. Per the spec:
Basically you need to choose which manifest declares the version for the pack. We should probably improve the error message. |
2 different workload can reference the same pack right? just cannot be separate manifest file right? |
Let's see if I understand what needs to happen:
If that is correct, who is the right person that should own the new workload pack for /cc @pranavkm @steveisok |
@jonathanpeppers That's something my team will put together. @wli3 in our case, the workload + pack will be 1-1 because of each team distributing their own. Assuming I'm reading what the spec says correctly. |
There doesn't necessarily have to be a separate MonoAOTCompiler workload manifest. It depends on what makes sense for shipping the workload packs. Basically, all of the workload manifests are combined together, and in the combination there should not be any workload pack or workload defined twice. However, a workload can include a workload pack defined in a different workload manifest. So you could use Hopefully that makes sense. Basically there is no fixed relationship between workloads and workload manifests. /cc @mhutch |
We were originally publishing the MonoAOTCompiler nuget and having Blazor, iOS, and Android include it as part of their workload. Unfortunately, the workload spec does not allow multiple pack references from different manifests. To get around this 1-1 relationship, we can supply a containing workload that can be consumed via the extends key. Resolves dotnet/sdk#16700
Hit this locally when running |
@jonathanpeppers @steveisok Has this been fixed? |
Yes, we extend the pack now: You can probably close this, unless you think you need to improve the error message if this happens. |
If you don't need to use MAUI, see if you have a folder |
5cdb5be in PR #18166 improves the message to report the manifests containing the conflicting items. At some point we should probably add a generic message when encountering any |
The use of |
Example: xamarin/xamarin-android#5539
I added this to the Android workload:
This is also used by
dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.BlazorWebAssembly\WorkloadManifest.json
.With both workloads using the same pack,
dotnet restore
fails with:Logs: msbuild.zip
I hit this using .NET 6.0.100-preview.4.21179.4.
To workaround I can completely delete this folder and
dotnet restore
succeeds:/cc @dsplaisted @wli3
The text was updated successfully, but these errors were encountered: