diff --git a/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs b/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs
index 5443421a5..697d1e9fd 100644
--- a/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs
+++ b/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs
@@ -33,7 +33,7 @@ namespace Xamarin.Android.Tools.BootstrapTasks
static readonly string assemblyToValidate = "Mono.Android.dll";
- static readonly string netCoreAppVersion = "netcoreapp3.1";
+ static readonly string netCoreAppVersion = "net6.0";
static string compatApiCommand = null;
// Path where Microsoft.DotNet.ApiCompat nuget package is located
diff --git a/build-tools/automation/azure-pipelines-nightly.yaml b/build-tools/automation/azure-pipelines-nightly.yaml
index 5a1c0c9c6..de6dbec60 100644
--- a/build-tools/automation/azure-pipelines-nightly.yaml
+++ b/build-tools/automation/azure-pipelines-nightly.yaml
@@ -40,7 +40,7 @@ variables:
InstallerArtifactName: installers-unsigned
TestAssembliesArtifactName: test-assemblies
DotNetCoreVersion: 3.1.405
- DotNet5Version: 5.0.201
+ DotNet6Version: 6.0.100-preview.3.21202.5
HostedMacImage: macOS-10.15
GitHub.Token: $(github--pat--vs-mobiletools-engineering-service2)
NUnit.NumberOfTestWorkers: 4
diff --git a/build-tools/automation/azure-pipelines-oss.yaml b/build-tools/automation/azure-pipelines-oss.yaml
index 8aea96367..adaeb1fd0 100644
--- a/build-tools/automation/azure-pipelines-oss.yaml
+++ b/build-tools/automation/azure-pipelines-oss.yaml
@@ -27,7 +27,7 @@ variables:
EXTRA_MSBUILD_ARGS: /p:AutoProvision=True /p:AutoProvisionUsesSudo=True /p:IgnoreMaxMonoVersion=False
PREPARE_FLAGS: PREPARE_CI=1 PREPARE_CI_PR=1
DotNetCoreVersion: 3.1.405
- DotNet5Version: 5.0.201
+ DotNet6Version: 6.0.100-preview.3.21202.5
GitHub.Token: $(github--pat--vs-mobiletools-engineering-service2)
stages:
@@ -54,7 +54,6 @@ stages:
- template: yaml-templates/use-dot-net.yaml
parameters:
- version: $(DotNet5Version)
remove_dotnet: true
- template: yaml-templates/use-dot-net.yaml
@@ -174,9 +173,6 @@ stages:
submodules: recursive
- template: yaml-templates/use-dot-net.yaml
- parameters:
- version: $(DotNet5Version)
- remove_dotnet: true
- template: yaml-templates/use-dot-net.yaml
parameters:
diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml
index 7ec6a14b0..aa86a1ad6 100644
--- a/build-tools/automation/azure-pipelines.yaml
+++ b/build-tools/automation/azure-pipelines.yaml
@@ -54,7 +54,7 @@ variables:
TestAssembliesArtifactName: test-assemblies
NUnitConsoleVersion: 3.11.1
DotNetCoreVersion: 3.1.405
- DotNet5Version: 5.0.201
+ DotNet6Version: 6.0.100-preview.3.21202.5
HostedMacImage: macOS-10.15
HostedWinVS2019: Hosted Windows 2019 with VS2019
VSEngWinVS2019: Xamarin-Android-Win2019
@@ -193,8 +193,6 @@ stages:
displayName: set JI_JAVA_HOME
- template: yaml-templates\use-dot-net.yaml
- parameters:
- version: $(DotNet5Version)
- template: yaml-templates\use-dot-net.yaml
parameters:
@@ -317,8 +315,6 @@ stages:
displayName: set JI_JAVA_HOME
- template: yaml-templates\use-dot-net.yaml
- parameters:
- version: $(DotNet5Version)
- template: yaml-templates\use-dot-net.yaml
parameters:
@@ -445,8 +441,6 @@ stages:
displayName: delete external xamarin-android submodule
- template: yaml-templates/use-dot-net.yaml
- parameters:
- version: $(DotNet5Version)
- template: yaml-templates/use-dot-net.yaml
parameters:
@@ -1316,6 +1310,10 @@ stages:
- 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)
@@ -1415,6 +1413,8 @@ stages:
- checkout: self
submodules: recursive
+ - template: yaml-templates/use-dot-net.yaml
+
- task: DownloadPipelineArtifact@2
inputs:
${{ if eq(variables['MicroBuildSignType'], 'Real') }}:
diff --git a/build-tools/automation/yaml-templates/commercial-build.yaml b/build-tools/automation/yaml-templates/commercial-build.yaml
index f044c4a0f..484d3b81e 100644
--- a/build-tools/automation/yaml-templates/commercial-build.yaml
+++ b/build-tools/automation/yaml-templates/commercial-build.yaml
@@ -8,7 +8,6 @@ steps:
- template: use-dot-net.yaml
parameters:
- version: $(DotNet5Version)
remove_dotnet: true
- template: use-dot-net.yaml
diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml
index 2b9bbdbc2..5bbd517ab 100644
--- a/build-tools/automation/yaml-templates/setup-test-environment.yaml
+++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml
@@ -29,13 +29,6 @@ steps:
condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))
- template: use-dot-net.yaml
- parameters:
- version: $(DotNet5Version)
- remove_dotnet: true
-
-- template: use-dot-net.yaml
- parameters:
- version: $(DotNetCoreVersion)
- task: MSBuild@1
displayName: build xaprepare
diff --git a/build-tools/automation/yaml-templates/use-dot-net.yaml b/build-tools/automation/yaml-templates/use-dot-net.yaml
index 301a254d4..3dd00128d 100644
--- a/build-tools/automation/yaml-templates/use-dot-net.yaml
+++ b/build-tools/automation/yaml-templates/use-dot-net.yaml
@@ -2,7 +2,7 @@
# We prefer this over the UseDotNet task so that we can always clean up old/unstable versions on disk.
parameters:
- version: $(DotNetCoreVersion)
+ version: $(DotNet6Version)
remove_dotnet: false
steps:
diff --git a/build-tools/create-packs/Directory.Build.targets b/build-tools/create-packs/Directory.Build.targets
index 4eaa9de02..4f5a70e95 100644
--- a/build-tools/create-packs/Directory.Build.targets
+++ b/build-tools/create-packs/Directory.Build.targets
@@ -14,7 +14,7 @@
- <_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\netcoreapp3.1\
+ <_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net6.0\
<_WorkloadResolverFlagFile>$(DotNetPreviewPath)sdk\$(MicrosoftDotnetSdkInternalPackageVersion)\EnableWorkloadResolver.sentinel
diff --git a/build-tools/create-packs/Microsoft.Android.Sdk.proj b/build-tools/create-packs/Microsoft.Android.Sdk.proj
index efd7e7d2e..263640356 100644
--- a/build-tools/create-packs/Microsoft.Android.Sdk.proj
+++ b/build-tools/create-packs/Microsoft.Android.Sdk.proj
@@ -26,7 +26,7 @@ core workload sdk packs imported by Microsoft.NET.Workload.Android.
DependsOnTargets="ConstructInstallerItems;_GenerateBundledVersions;_GetLicense">
$(XamarinAndroidSourcePath)bin\Build$(Configuration)\packs\tools\
- $(XamarinAndroidSourcePath)bin\$(Configuration)-netcoreapp3.1\
+ $(XamarinAndroidSourcePath)bin\$(Configuration)-net6.0\
diff --git a/build-tools/scripts/Configuration.Java.Interop.Override.props b/build-tools/scripts/Configuration.Java.Interop.Override.props
index b0c4534a5..299041652 100644
--- a/build-tools/scripts/Configuration.Java.Interop.Override.props
+++ b/build-tools/scripts/Configuration.Java.Interop.Override.props
@@ -3,7 +3,7 @@
$(MSBuildThisFileDirectory)..\..\external\mono\external\cecil
$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\
- $(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-netcoreapp3.1\
+ $(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-net6.0\
$(MSBuildThisFileDirectory)..\..\external\xamarin-android-tools
diff --git a/build-tools/scripts/JavaCallableWrappers.targets b/build-tools/scripts/JavaCallableWrappers.targets
index 7d181e7c6..558eac42d 100644
--- a/build-tools/scripts/JavaCallableWrappers.targets
+++ b/build-tools/scripts/JavaCallableWrappers.targets
@@ -14,8 +14,8 @@
$(MSBuildProjectDirectory)\$(OutputPath)
"$(XAInstallPrefix)xbuild\Xamarin\Android\jcw-gen.exe" -v10
<_LibDirs>-L "$(OutputPathAbs.TrimEnd('\'))"
- <_LibDirs Condition=" '$(TargetFramework)' != 'netcoreapp3.1' ">$(_LibDirs) -L "$(OutputPathAbs)..\v1.0" -L "$(OutputPathAbs)..\v1.0\Facades"
- <_LibDirs Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">$(_LibDirs) -L "$(_CorlibDir.TrimEnd('\'))"
+ <_LibDirs Condition=" '$(TargetFramework)' != 'net6.0' ">$(_LibDirs) -L "$(OutputPathAbs)..\v1.0" -L "$(OutputPathAbs)..\v1.0\Facades"
+ <_LibDirs Condition=" '$(TargetFramework)' == 'net6.0' ">$(_LibDirs) -L "$(_CorlibDir.TrimEnd('\'))"
<_Out>-o "$(MSBuildProjectDirectory)\$(IntermediateOutputPath)jcw\src"
GetCachedPath (ref testBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Test{ctx.Configuration}"));
public static string BinDir => GetCachedPath (ref binDir, () => Path.Combine (Configurables.Paths.BinDirRoot, ctx.Configuration));
- public static string NetCoreBinDir => GetCachedPath (ref netCoreBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"{ctx.Configuration}-netcoreapp3.1"));
+ public static string NetCoreBinDir => GetCachedPath (ref netCoreBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"{ctx.Configuration}-net6.0"));
public static string BuildBinDir => GetCachedPath (ref buildBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Build{ctx.Configuration}"));
public static string MingwBinDir => GetCachedPath (ref mingwBinDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidMxeFullPath), "bin"));
public static string ProfileAssembliesProjitemsPath => GetCachedPath (ref profileAssembliesProjitemsPath, () => Path.Combine (BuildBinDir, "ProfileAssemblies.projitems"));
diff --git a/external/xamarin-android-tools b/external/xamarin-android-tools
index c5732a0e9..683f37508 160000
--- a/external/xamarin-android-tools
+++ b/external/xamarin-android-tools
@@ -1 +1 @@
-Subproject commit c5732a0e9f4bd4176f43b0568880cfe453fc78de
+Subproject commit 683f37508b56c76c24b3287a5687743438625341
diff --git a/global.json b/global.json
index d1c05a8b8..f86eb36a4 100644
--- a/global.json
+++ b/global.json
@@ -1,4 +1,7 @@
{
+ "sdk": {
+ "allowPrerelease": true
+ },
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "2.0.1",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20555.6"
diff --git a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj
index 48d3eaf93..39ddab0d2 100644
--- a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj
+++ b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
NET5_LINKER
false
$(XAInstallPrefix)xbuild\Xamarin\Android\
diff --git a/src/Mono.Android.Export/Mono.Android.Export.csproj b/src/Mono.Android.Export/Mono.Android.Export.csproj
index 714cb8dbe..83ccc2066 100644
--- a/src/Mono.Android.Export/Mono.Android.Export.csproj
+++ b/src/Mono.Android.Export/Mono.Android.Export.csproj
@@ -3,9 +3,9 @@
-
+
monoandroid10
- monoandroid10;netcoreapp3.1
+ monoandroid10;net6.0
true
..\..\product.snk
true
@@ -21,7 +21,7 @@
false
-
+
$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\
@@ -52,7 +52,7 @@
-
+
diff --git a/src/Mono.Android/Mono.Android.csproj b/src/Mono.Android/Mono.Android.csproj
index 54ef7cd40..e895b3368 100644
--- a/src/Mono.Android/Mono.Android.csproj
+++ b/src/Mono.Android/Mono.Android.csproj
@@ -5,7 +5,7 @@
- monoandroid10;netcoreapp3.1
+ monoandroid10;net6.0
Android
true
..\..\product.snk
@@ -41,7 +41,7 @@
$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\$(AndroidFrameworkVersion)\
-
+
$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\$(TargetFramework)\
@@ -92,7 +92,7 @@
-
+
ILLink.LinkAttributes.xml
@@ -375,8 +375,8 @@
-
-
+
+
diff --git a/src/Mono.Android/Mono.Android.targets b/src/Mono.Android/Mono.Android.targets
index 3b6e14ad8..725b7fdab 100644
--- a/src/Mono.Android/Mono.Android.targets
+++ b/src/Mono.Android/Mono.Android.targets
@@ -43,7 +43,7 @@
<_PackageVersion>$(ProductVersion)
<_PackageVersionBuild>$(XAVersionCommitCount)
-
+
<_PackageVersion>$(AndroidPackVersion)
<_PackageVersionBuild>$(PackVersionCommitCount)
diff --git a/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.projitems b/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.projitems
index 47f4d0485..852162011 100644
--- a/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.projitems
+++ b/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.projitems
@@ -22,8 +22,8 @@
-
-
+
+
diff --git a/tools/javadoc2mdoc/javadoc2mdoc.csproj b/tools/javadoc2mdoc/javadoc2mdoc.csproj
index c6ffa0874..edcd8d05a 100644
--- a/tools/javadoc2mdoc/javadoc2mdoc.csproj
+++ b/tools/javadoc2mdoc/javadoc2mdoc.csproj
@@ -1,6 +1,6 @@
- net472;netcoreapp3.1
+ net472;net6.0
false
Exe
Xamarin.Android.Tools.JavadocToMDoc