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 b02c5d30dd8..59c2f64b8e2 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 @@ -32,7 +32,7 @@ public sealed class CheckApiCompatibility : Task static readonly string assemblyToValidate = "Mono.Android.dll"; - static readonly string netCoreAppVersion = "netcoreapp3.1"; + static readonly string netCoreAppVersion = "net5.0"; static string compatApiCommand = null; // Path where Microsoft.DotNet.ApiCompat nuget package is located diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 3b8e99d55f9..7b210713869 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -51,7 +51,7 @@ variables: InstallerArtifactName: installers TestAssembliesArtifactName: test-assemblies NUnitConsoleVersion: 3.11.1 - DotNetCoreVersion: 3.1.201 + DotNetCoreVersion: 5.0.100-rc.2.20479.15 HostedMacMojave: Hosted Mac Internal Mojave HostedMac: Hosted Mac Internal HostedWinVS2019: Hosted Windows 2019 with VS2019 @@ -782,7 +782,7 @@ stages: job_name: mac_dotnet_tests_1 job_suffix: One .NET nunit_categories: $(DotNetNUnitCategories) - target_framework: 'netcoreapp3.1' + target_framework: 'net5.0' - template: yaml-templates\run-msbuild-mac-tests.yaml parameters: @@ -790,7 +790,7 @@ stages: job_name: mac_dotnet_tests_2 job_suffix: One .NET nunit_categories: $(DotNetNUnitCategories) - target_framework: 'netcoreapp3.1' + target_framework: 'net5.0' - template: yaml-templates\run-msbuild-mac-tests.yaml parameters: @@ -798,7 +798,7 @@ stages: job_name: mac_dotnet_tests_3 job_suffix: One .NET nunit_categories: $(DotNetNUnitCategories) - target_framework: 'netcoreapp3.1' + target_framework: 'net5.0' # Xamarin.Android (Test MSBuild One .NET - Windows) - template: yaml-templates\run-msbuild-win-tests.yaml @@ -807,7 +807,7 @@ stages: job_name: win_dotnet_tests_1 job_suffix: One .NET nunit_categories: $(DotNetNUnitCategories) - target_framework: 'netcoreapp3.1' + target_framework: 'net5.0' - template: yaml-templates\run-msbuild-win-tests.yaml parameters: @@ -815,7 +815,7 @@ stages: job_name: win_dotnet_tests_2 job_suffix: One .NET nunit_categories: $(DotNetNUnitCategories) - target_framework: 'netcoreapp3.1' + target_framework: 'net5.0' - template: yaml-templates\run-msbuild-win-tests.yaml parameters: @@ -823,7 +823,7 @@ stages: job_name: win_dotnet_tests_3 job_suffix: One .NET nunit_categories: $(DotNetNUnitCategories) - target_framework: 'netcoreapp3.1' + target_framework: 'net5.0' - stage: msbuilddevice_tests displayName: MSBuild Emulator Tests diff --git a/build-tools/automation/yaml-templates/run-msbuild-mac-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-mac-tests.yaml index d12320fdce8..9f29d613863 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-mac-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-mac-tests.yaml @@ -17,7 +17,7 @@ jobs: workspace: clean: all variables: - UseDotNet: ${{ eq(parameters.target_framework, 'netcoreapp3.1') }} + UseDotNet: ${{ eq(parameters.target_framework, 'net5.0') }} steps: - template: setup-test-environment.yaml diff --git a/build-tools/automation/yaml-templates/run-msbuild-win-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-win-tests.yaml index 4b8736577e3..410d88c809c 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-win-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-win-tests.yaml @@ -16,7 +16,7 @@ jobs: cancelTimeoutInMinutes: 5 variables: VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise - UseDotNet: ${{ eq(parameters.target_framework, 'netcoreapp3.1') }} + UseDotNet: ${{ eq(parameters.target_framework, 'net5.0') }} steps: - template: kill-processes.yaml diff --git a/build-tools/create-packs/Directory.Build.targets b/build-tools/create-packs/Directory.Build.targets index 9e3c57ad3e4..9ec3ed2ee0b 100644 --- a/build-tools/create-packs/Directory.Build.targets +++ b/build-tools/create-packs/Directory.Build.targets @@ -11,7 +11,7 @@ - <_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\netcoreapp3.1\ + <_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net5.0\ <_WorkloadResolverFlagFile>$(DotNetPreviewPath)sdk\$(DotNetPreviewVersionFull)\EnableWorkloadResolver.sentinel diff --git a/build-tools/create-packs/Microsoft.Android.Ref.proj b/build-tools/create-packs/Microsoft.Android.Ref.proj index 475465fb9c5..2a12044b296 100644 --- a/build-tools/create-packs/Microsoft.Android.Ref.proj +++ b/build-tools/create-packs/Microsoft.Android.Ref.proj @@ -34,7 +34,7 @@ by projects that use the Microsoft.Android framework in .NET 5. - <_AndroidRefPackAssemblies Include="$(JavaInteropSourceDirectory)\bin\$(Configuration)-netcoreapp3.1\ref\Java.Interop.dll" /> + <_AndroidRefPackAssemblies Include="$(JavaInteropSourceDirectory)\bin\$(Configuration)-net5.0\ref\Java.Interop.dll" /> <_AndroidRefPackAssemblies Include="$(_MonoAndroidNETOutputDir)ref\Mono.Android.dll" /> <_AndroidRefPackAssemblies Include="$(_MonoAndroidNETOutputDir)ref\Mono.Android.Export.dll" /> diff --git a/build-tools/create-packs/Microsoft.Android.Sdk.proj b/build-tools/create-packs/Microsoft.Android.Sdk.proj index 0cc2c8f348f..e065edae2ea 100644 --- a/build-tools/create-packs/Microsoft.Android.Sdk.proj +++ b/build-tools/create-packs/Microsoft.Android.Sdk.proj @@ -36,7 +36,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)-net5.0\ diff --git a/build-tools/scripts/Configuration.Java.Interop.Override.props b/build-tools/scripts/Configuration.Java.Interop.Override.props index b0c4534a52c..66d9e2a65b2 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)-net5.0\ $(MSBuildThisFileDirectory)..\..\external\xamarin-android-tools diff --git a/build-tools/scripts/JavaCallableWrappers.targets b/build-tools/scripts/JavaCallableWrappers.targets index 7d181e7c653..bf03842c6bc 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)' != 'net5.0' ">$(_LibDirs) -L "$(OutputPathAbs)..\v1.0" -L "$(OutputPathAbs)..\v1.0\Facades" + <_LibDirs Condition=" '$(TargetFramework)' == 'net5.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}-net5.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/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj index 6e66df24856..0ae0051211a 100644 --- a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj +++ b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj @@ -1,8 +1,7 @@  - netcoreapp3.1 - NET5_LINKER + net5.0 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 714cb8dbe4a..087cebe7750 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;net5.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 1c1317f8df4..bd00d721a98 100644 --- a/src/Mono.Android/Mono.Android.csproj +++ b/src/Mono.Android/Mono.Android.csproj @@ -5,7 +5,7 @@ - monoandroid10;netcoreapp3.1 + monoandroid10;net5.0 Android true ..\..\product.snk @@ -32,7 +32,7 @@ $(XAInstallPrefix)xbuild-frameworks\MonoAndroid\$(AndroidFrameworkVersion)\ - + $(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\$(TargetFramework)\ @@ -83,7 +83,7 @@ - + @@ -360,8 +360,8 @@ - - + + diff --git a/src/Mono.Android/Mono.Android.targets b/src/Mono.Android/Mono.Android.targets index 76f9388fb5f..2db4f33b31c 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.Build.Tasks/Linker/Mobile.Tuner/MobileProfile.cs b/src/Xamarin.Android.Build.Tasks/Linker/Mobile.Tuner/MobileProfile.cs index ad526057040..6fa85ed52bd 100644 --- a/src/Xamarin.Android.Build.Tasks/Linker/Mobile.Tuner/MobileProfile.cs +++ b/src/Xamarin.Android.Build.Tasks/Linker/Mobile.Tuner/MobileProfile.cs @@ -4,7 +4,7 @@ using Mono.Cecil; using Mono.Tuner; -#if NET5_LINKER +#if NET5_0 using Microsoft.Android.Sdk.ILLink; #endif diff --git a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/ApplyPreserveAttribute.cs b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/ApplyPreserveAttribute.cs index 20db8902d8c..b9c2112daea 100644 --- a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/ApplyPreserveAttribute.cs +++ b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/ApplyPreserveAttribute.cs @@ -8,7 +8,7 @@ using Mono.Cecil; -#if NET5_LINKER +#if NET5_0 using Microsoft.Android.Sdk.ILLink; #endif diff --git a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/FixAbstractMethodsStep.cs b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/FixAbstractMethodsStep.cs index fa725c384f7..d51cac6568e 100644 --- a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/FixAbstractMethodsStep.cs +++ b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/FixAbstractMethodsStep.cs @@ -10,7 +10,7 @@ using Mono.Linker.Steps; using Mono.Tuner; -#if NET5_LINKER +#if NET5_0 using Microsoft.Android.Sdk.ILLink; #endif @@ -36,12 +36,12 @@ protected override void ProcessAssembly (AssemblyDefinition assembly) if (IsProductOrSdkAssembly (assembly)) return; -#if !NET5_LINKER +#if !NET5_0 CheckAppDomainUsageUnconditional (assembly, (string msg) => Context.LogMessage (MessageImportance.High, msg)); #endif if (FixAbstractMethodsUnconditional (assembly)) { -#if !NET5_LINKER +#if !NET5_0 Context.SafeReadSymbols (assembly); #endif AssemblyAction action = Annotations.HasAction (assembly) ? Annotations.GetAction (assembly) : AssemblyAction.Skip; @@ -55,7 +55,7 @@ protected override void ProcessAssembly (AssemblyDefinition assembly) } -#if !NET5_LINKER +#if !NET5_0 internal void CheckAppDomainUsage (AssemblyDefinition assembly, Action warn) { if (IsProductOrSdkAssembly (assembly)) @@ -304,7 +304,7 @@ public virtual void LogMessage (string message) protected virtual AssemblyDefinition GetMonoAndroidAssembly () { -#if !NET5_LINKER +#if !NET5_0 foreach (var assembly in Context.GetAssemblies ()) { if (assembly.Name.Name == "Mono.Android") return assembly; diff --git a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PreserveExportedTypes.cs b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PreserveExportedTypes.cs index 2171352db50..7278ec86551 100644 --- a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PreserveExportedTypes.cs +++ b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PreserveExportedTypes.cs @@ -8,7 +8,7 @@ using Mono.Cecil; -#if NET5_LINKER +#if NET5_0 using Microsoft.Android.Sdk.ILLink; #endif diff --git a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveAttributes.cs b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveAttributes.cs index 493b37cd66e..e5e1d803f44 100644 --- a/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveAttributes.cs +++ b/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveAttributes.cs @@ -6,7 +6,7 @@ using Mono.Linker; using Mono.Linker.Steps; -#if NET5_LINKER +#if NET5_0 using Microsoft.Android.Sdk.ILLink; #endif @@ -21,7 +21,7 @@ public class RemoveAttributes : RemoveAttributesBase { protected virtual bool DebugBuild { get { -#if NET5_LINKER +#if NET5_0 return true; #else return context.LinkSymbols; diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs index 1a86883d4a1..e5cad5759bb 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs @@ -46,7 +46,7 @@ public static string AndroidMSBuildDirectory { static SetUp () { -#if NETCOREAPP3_1 +#if NET5_0 Builder.UseDotNet = true; #else Builder.UseDotNet = false; diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj index b16145c23a0..3f57fe0d108 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj @@ -1,7 +1,7 @@ - net472;netcoreapp3.1 + net472;net5.0 true ..\..\..\..\bin\Test$(Configuration) @@ -17,7 +17,7 @@ - + diff --git a/tools/javadoc2mdoc/javadoc2mdoc.csproj b/tools/javadoc2mdoc/javadoc2mdoc.csproj index c6ffa087438..303ec18c842 100644 --- a/tools/javadoc2mdoc/javadoc2mdoc.csproj +++ b/tools/javadoc2mdoc/javadoc2mdoc.csproj @@ -1,6 +1,6 @@ - net472;netcoreapp3.1 + net472;net5.0 false Exe Xamarin.Android.Tools.JavadocToMDoc