From 39e597ecf439b86c104bf3d8e5d17f6527f2a200 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 25 Aug 2022 09:50:23 -0500 Subject: [PATCH] Add support for .NET 6 & 7 Android workloads (#41) Context: https://github.com/xamarin/xamarin-android/pull/7261#discussion_r954477870 To make .NET 6 builds work from a .NET 7 SDK, we are changing: Microsoft.Android.Sdk To: Microsoft.Android.Sdk.net6 Microsoft.Android.Sdk.net7 To deal with this in Xamarin.Legacy.Sdk, by default it will check for: To get the old behavior, you can set: true Or to explicitly select, you can set one of: true true In a future change, we can make .NET 7 the default, but likely only after it is released GA. --- samples/Directory.Build.props | 6 ++++++ .../Sdk/Xamarin.Legacy.Android.targets | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 samples/Directory.Build.props diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props new file mode 100644 index 0000000..b42e6c3 --- /dev/null +++ b/samples/Directory.Build.props @@ -0,0 +1,6 @@ + + + + true + + \ No newline at end of file diff --git a/src/Xamarin.Legacy.Sdk/Sdk/Xamarin.Legacy.Android.targets b/src/Xamarin.Legacy.Sdk/Sdk/Xamarin.Legacy.Android.targets index 3171436..426b737 100644 --- a/src/Xamarin.Legacy.Sdk/Sdk/Xamarin.Legacy.Android.targets +++ b/src/Xamarin.Legacy.Sdk/Sdk/Xamarin.Legacy.Android.targets @@ -25,7 +25,21 @@ Android true - + + +