This repository has been archived by the owner on May 1, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for .NET 6 & 7 Android workloads
Context: dotnet/android#7261 (comment) 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: <!-- if we are not .NET 7 use .NET 6, so legacy or net6.0 will import !$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) --> <Import Sdk="Microsoft.Android.Sdk.net6" ... /> <!-- import .NET 7 if we are .NET 7 $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) --> <Import Sdk="Microsoft.Android.Sdk.net7" ... /> To get the old behavior, you can set: <UseMicrosoftAndroidSdk>true</UseMicrosoftAndroidSdk> Or to explicitly select, you can set one of: <UseMicrosoftAndroidSdkNet6>true</UseMicrosoftAndroidSdkNet6> <UseMicrosoftAndroidSdkNet7>true</UseMicrosoftAndroidSdkNet7> In a future change, we can make .NET 7 the default, but likely only after it is released GA.
- Loading branch information