Reputation: 808
How would I create a Xamarin.Android
project that targets .NET 6 (Xamarin.Android being the traditional Android bindings, not .NET MAUI)?
Creating a new project from the Visual Studio 2022 UI generates the same Mono template Visual Studio 2019 does.
This guide seems to suggest manually editing the .csproj file, but doing that breaks the build with errors like:
Package Xamarin.AndroidX.AppCompat 1.3.1.3 is not compatible with monoandroid50 (MonoAndroid,Version=v5.0)
Upvotes: 6
Views: 4412
Reputation: 10938
Upgrade your Visual Studio to Visual Studio 2022 preview.
Version: Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.1.0 Preview 4.0
After that you could create Android project with .Net 6.0.
Upvotes: 5