diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml
index b36e5a03e01..12b8af8d496 100644
--- a/build-tools/automation/azure-pipelines.yaml
+++ b/build-tools/automation/azure-pipelines.yaml
@@ -1291,20 +1291,13 @@ stages:
workspace:
clean: all
steps:
- - checkout: self
- submodules: recursive
+ - template: yaml-templates/setup-test-environment.yaml
+ parameters:
+ xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android
- checkout: release_scripts
clean: true
- - template: yaml-templates/use-dot-net.yaml
- parameters:
- remove_dotnet: true
-
- - template: yaml-templates/use-dot-net.yaml
- parameters:
- version: $(DotNetCoreVersion)
-
- task: DownloadPipelineArtifact@2
inputs:
${{ if eq(variables['MicroBuildSignType'], 'Real') }}:
@@ -1397,10 +1390,9 @@ stages:
- ${{ if eq(variables['MicroBuildSignType'], 'Real') }}:
- group: Publish-Build-Assets
steps:
- - checkout: self
- submodules: recursive
-
- - template: yaml-templates/use-dot-net.yaml
+ - template: yaml-templates/setup-test-environment.yaml
+ parameters:
+ configuration: $(XA.Build.Configuration)
- task: DownloadPipelineArtifact@2
inputs:
diff --git a/build-tools/create-packs/Directory.Build.targets b/build-tools/create-packs/Directory.Build.targets
index af6092742d7..61233e10a8a 100644
--- a/build-tools/create-packs/Directory.Build.targets
+++ b/build-tools/create-packs/Directory.Build.targets
@@ -75,12 +75,6 @@
DependsOnTargets="DeleteExtractedWorkloadPacks" >
<_WLManifest Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.NET.Sdk.Android.Manifest-*.nupkg" />
- <_WLPacks Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.Android.Sdk.$(HostOS).*.nupkg" />
- <_WLPacks Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.Android.Sdk.BundleTool.*.nupkg" />
- <_WLPacks Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.Android.Ref.*.nupkg" />
- <_WLTemplates Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.Android.Templates.*.nupkg" />
-
-
<_WLPackVersion>@(_WLManifest->'%(Filename)'->Replace('Microsoft.NET.Sdk.Android.Manifest-$(DotNetPreviewVersionBand).', ''))
@@ -97,24 +91,30 @@
-
-
-
-
-
- <_UnixExecutables Include="$(DotNetPreviewPath)packs\Microsoft.Android.Sdk.*\*\tools\$(HostOS)\**\*.*" />
- <_FilesToTouch Include="$(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\microsoft.net.sdk.android\**" />
- <_FilesToTouch Include="$(DotNetPreviewPath)packs\$([System.String]::Copy('%(_WLPacks.Filename)').Replace('.$(_WLPackVersion)', ''))\$(_WLPackVersion)\**" />
-
+
+
+
+ <_TempDirectory>$(DotNetPreviewPath)..\.xa-workload-temp-$([System.IO.Path]::GetRandomFileName())
+ <_NuGetConfig>$(_TempDirectory)\NuGet.config
+ <_NuGetContent>
+
+
+
+
+
+
+
+
+]]>
+
+
+
-
-
+
diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs b/build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs
index 30180977df6..641f56c7cd9 100644
--- a/build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs
+++ b/build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs
@@ -68,6 +68,12 @@ protected override async Task Execute (Context context)
}
}
+ // Delete the metadata folder, which contains old workload data
+ var metadataPath = Path.Combine (dotnetPath, "metadata");
+ if (Directory.Exists (metadataPath)) {
+ Utilities.DeleteDirectory (metadataPath);
+ }
+
if (File.Exists (dotnetTool)) {
if (!TestDotNetSdk (dotnetTool)) {
Log.WarningLine ($"Attempt to run `dotnet --version` failed, reinstalling the SDK.");
diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json b/src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json
index c6aba630136..71732354a8b 100644
--- a/src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json
+++ b/src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json
@@ -1,15 +1,23 @@
{
"version": "@WORKLOAD_VERSION@",
"workloads": {
- "microsoft-android-sdk-full": {
- "description": "Android SDK",
+ "android": {
+ "description": "Microsoft Android SDK for .NET",
"packs": [
"Microsoft.Android.Sdk",
"Microsoft.Android.Sdk.BundleTool",
"Microsoft.Android.Ref",
+ "Microsoft.Android.Runtime.android-arm",
+ "Microsoft.Android.Runtime.android-arm64",
+ "Microsoft.Android.Runtime.android-x86",
+ "Microsoft.Android.Runtime.android-x64",
"Microsoft.Android.Templates"
],
"extends" : [ "microsoft-net-runtime-android" ]
+ },
+ "android-aot": {
+ "description": "Microsoft Android SDK for .NET with AOT support",
+ "extends" : [ "android", "microsoft-net-runtime-android-aot" ]
}
},
"packs": {
@@ -32,6 +40,22 @@
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
+ "Microsoft.Android.Runtime.android-arm": {
+ "kind": "framework",
+ "version": "@WORKLOAD_VERSION@"
+ },
+ "Microsoft.Android.Runtime.android-arm64": {
+ "kind": "framework",
+ "version": "@WORKLOAD_VERSION@"
+ },
+ "Microsoft.Android.Runtime.android-x86": {
+ "kind": "framework",
+ "version": "@WORKLOAD_VERSION@"
+ },
+ "Microsoft.Android.Runtime.android-x64": {
+ "kind": "framework",
+ "version": "@WORKLOAD_VERSION@"
+ },
"Microsoft.Android.Templates": {
"kind": "template",
"version": "@WORKLOAD_VERSION@"