Skip to content

Commit 708a49e

Browse files
jonathanpeppersjonpryor
authored andcommitted
[xaprepare] don't install microsoft-net-runtime-android workload (dotnet#6114)
Context: dotnet#6112 (review) The .NET Preview 7 bump is failing with: Running: /Users/builder/Library/Android/dotnet/dotnet "workload" "install" "microsoft-net-runtime-android" "--skip-manifest-update" "--verbosity" "diag" stderr | Workload with id microsoft-net-runtime-android is not recognized. However, it was a bug in the `dotnet workload install` command that allowed us to even install this workload in the first place! The concept concept behind "abstract" workloads is they are not user visible in any way; they're meant to be an implementation detail. In commit 0150bbb, I setup `xaprepare` to install the `microsoft-net-runtime-android` workload, but we don't actually even need to do this. We can simply update the `sdk-manifest` for this pack, so that the version matches `$(DotNetRuntimePacksVersion)`. The `microsoft-net-runtime-android` workload will get installed later during the `ExtractWorkloadPacks` target, as part of installing the `android` or `android-aot` workloads: https://github.com/xamarin/xamarin-android/blob/c1a2ee70214e86757541b5759c9ed54941bd4680/build-tools/create-packs/Directory.Build.targets#L119-L122 Since `android` and `android-aot` extend `microsoft-net-runtime-android`, this step will install it.
1 parent ae70076 commit 708a49e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ protected override async Task<bool> Execute (Context context)
102102
Utilities.CopyFileToDir (file, destination);
103103
}
104104

105-
// Install the microsoft-net-runtime-android workload
106-
if (!Utilities.RunCommand (dotnetTool, BuildPaths.XamarinAndroidSourceRoot, ignoreEmptyArguments: false, new [] { "workload", "install", "microsoft-net-runtime-android", "--skip-manifest-update", "--verbosity", "diag" })) {
107-
Log.ErrorLine ($"dotnet workload install failed.");
108-
return false;
109-
}
110-
111105
return true;
112106
}
113107

0 commit comments

Comments
 (0)