Skip to content

Commit 88f0b29

Browse files
[xaprepare] use 8.0.100 version band for Mono workloads (#7530)
Context: dotnet/runtime#77385 Building `net6.0-android` and `net7.0-android` apps with .NET 8 is failing with: Microsoft.Android.Sdk.RuntimeConfig.targets(46,5): error MSB4036: The "RuntimeConfigParserTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "/Users/runner/work/1/s/xamarin-android/bin/Release/dotnet/sdk/8.0.100-alpha.1.22553.2" directory. The problem appears to be due to the import ordering: 8.0.100-alpha.1/microsoft.net.workload.mono.toolchain.net6/WorkloadManifest.targets 8.0.100-alpha.1/microsoft.net.workload.mono.toolchain.net7/WorkloadManifest.targets 8.0.100-alpha.1/microsoft.net.workload.mono.toolchain/WorkloadManifest.targets Where the third one should be imported first for this to work. I believe this broke in 5f3deea, which inadvertently put these files in the `8.0.100-alpha.1` directory instead of `8.0.100`. The "baseline" version is always imported first, which is `8.0.100`: * https://github.com/dotnet/installer/blob/c09cc8aada26be846359961fe160b5eff528d9df/src/redist/targets/BundledManifests.targets#L9-L13 Move the location of these files to fix this issue.
1 parent ca2c629 commit 88f0b29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@ protected override async Task<bool> Execute (Context context)
4646
return false;
4747
}
4848

49-
var sdk_manifests = Path.Combine (dotnetPath, "sdk-manifests", context.Properties.GetRequiredValue (KnownProperties.DotNetSdkManifestsFolder));
49+
var sdk_manifests = Path.Combine (dotnetPath, "sdk-manifests");
5050

5151
// Copy the WorkloadManifest.* files from the latest Microsoft.NET.Workload.* listed in package-download.proj
5252
// NOTE: the packages that actually *exist* in .NET 8 are mismatched right now...
5353
var dotnets = new [] { ".net6", ".net7", "" };
5454
foreach (var dotnet in dotnets) {
55-
var destination = Path.Combine (sdk_manifests, $"microsoft.net.workload.mono.toolchain{dotnet}");
55+
var destination = Path.Combine (sdk_manifests, context.Properties.GetRequiredValue (KnownProperties.DotNetMonoManifestVersionBand), $"microsoft.net.workload.mono.toolchain{dotnet}");
5656
foreach (var file in Directory.GetFiles (string.Format (Configurables.Paths.MicrosoftNETWorkloadMonoToolChainDir, dotnet), "WorkloadManifest.*")) {
5757
Utilities.CopyFileToDir (file, destination);
5858
}
5959
if (dotnet != "") {
60-
destination = Path.Combine (sdk_manifests, $"microsoft.net.workload.emscripten{dotnet}");
60+
destination = Path.Combine (sdk_manifests, context.Properties.GetRequiredValue (KnownProperties.DotNetEmscriptenManifestVersionBand), $"microsoft.net.workload.emscripten{dotnet}");
6161
foreach (var file in Directory.GetFiles (string.Format (Configurables.Paths.MicrosoftNETWorkloadEmscriptenDir, dotnet), "WorkloadManifest.*")) {
6262
Utilities.CopyFileToDir (file, destination);
6363
}

0 commit comments

Comments
 (0)