Issue with upgrade Xamarin to .Net 6

%3CLINGO-SUB%20id%3D%22lingo-sub-2942596%22%20slang%3D%22en-US%22%3EIssue%20with%20upgrade%20Xamarin%20to%20.Net%206%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2942596%22%20slang%3D%22en-US%22%3E%3CP%3EI%20decided%20to%20try%20to%20upgrade%20the%20old%20Xamarin%20Forms%20app%20to%20.Net%206%20and%20found%20an%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%3A%20error%20XFVM001%3A%20Target%20Framework%20Version%20is%20currently%20v6.0%20and%20must%20be%20greater%20than%20or%20equal%20to%20v9.0%20in%20order%20to%20use%20Material%20on%20Android.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20the%20output%20contains%20next%20line%3A%3C%2FP%3E%3CP%3Ewarning%20XA4211%3A%20AndroidManifest.xml%20%2F%2Fuses-sdk%2F%40android%3AtargetSdkVersion%20'30'%20is%20less%20than%20%24(TargetFrameworkVersion)%20''.%20Using%20API-31%20for%20ACW%20compilation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20new%20project%20file%20looks%20like%20that%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3E%3CPROJECT%20sdk%3D%22Microsoft.NET.Sdk%22%3E%0A%20%3CPROPERTYGROUP%3E%0A%20%20%3COUTPUTTYPE%3Eexe%3C%2FOUTPUTTYPE%3E%0A%20%20%3CTARGETFRAMEWORK%3Enet6.0-android%3C%2FTARGETFRAMEWORK%3E%0A%20%20%3CTARGETFRAMEWORKVERSION%3Ev30.0%3C%2FTARGETFRAMEWORKVERSION%3E%0A%20%3C%2FPROPERTYGROUP%3E%0A%3C%2FPROJECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20suppose%20it%20is%20somehow%20related%20to%20Xamarin.Forms.Visual.Material.%26nbsp%3B%20Any%20ideas%20what%20is%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%3A%20I%20tried%20to%20use%20the%20upgrade%20tool%2C%20but%20it%20failed%20too.%20It%20was%20not%20able%20to%20find%20the%20nugets%20for%20some%20reason.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdate%202%3C%2FSTRONG%3E%3A%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fbyme8%2FexpXamarin6%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESample%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2942596%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EXamarin.Forms%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I decided to try to upgrade the old Xamarin Forms app to .Net 6 and found an issue.

 

Error: error XFVM001: Target Framework Version is currently v6.0 and must be greater than or equal to v9.0 in order to use Material on Android.

 

Also, the output contains next line:

warning XA4211: AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '30' is less than $(TargetFrameworkVersion) ''. Using API-31 for ACW compilation.

 

The new project file looks like that:

 

 

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<OutputType>exe</OutputType>
		<TargetFramework>net6.0-android</TargetFramework>
		<TargetFrameworkVersion>v30.0</TargetFrameworkVersion>
	</PropertyGroup>
</Project>

 

I suppose it is somehow related to Xamarin.Forms.Visual.Material.  Any ideas what is wrong?

 

Update: I tried to use the upgrade tool, but it failed too. It was not able to find the nugets for some reason.

 

Update 2: Sample

1 Reply
Well that .NET 6 support is still in preview for iOS/Android and not officially support and probably wont be for Xamarin.Forms. I would post an issue on the github or ask on https://docs.microsoft.com/answers/products/dotnet