-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
As found in dotnet/runtime#52991 and discussed internally, building dotnet/runtime with a system-wide dotnet
fails with something like:
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21262.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(24,5): error NETSDK1147: The following workload packs were not installed: Microsoft.iOS.Sdk Microsoft.iOS.Windows.Sdk
The reason for the error is that some projects include net6.0-Android
or net6.0-iOS
in their <TargetFrameworks>
. In this context, we don't mean Xamarin Android or Xamarin iOS, but instead we mean that the runtime is being built for android / iOS.
I want to open a discussion about the best way to work around the problem.
Current Workarounds
- Set
MSBuildEnableWorkloadResolver=false
- build.cmd/sh in runtime to use the in repo dotnet
Possible Solution
Each workload would be responsible for defining a <DisableXYZWorkload>
property and each AutoImport.props
and WorkloadManifest.targets
would need to check it.