1
votes

I just updated to Xamarin Forms 5 and now I cannot compile my project. I get the error message

The $(TargetFrameworkVersion) (v9.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0). You need to increase the $(TargetFrameworkVersion)

However, as you can see from the screen shot below, my Target Framework Version IS 10. What am I missing??

enter image description here

2
there are two places in the project settings dialog you need to check - one under Build -> General, the other under Build -> Android App - Jason

2 Answers

2
votes

That's actually very easy.

First, go to the Android project and right-click it.

Properties>Application>Compile using Android version(Target version).

Change that to Android 10.0

Then go to the Android Manifest option below the application option.

Change the Target Android version to 10 as well.

This should solve it.

Goodluck

Revert in case of queries

0
votes

One of my students was using Visual Studio 2019 for Mac and had a similar error.

I shared this link with him. After reading the ideas above, he figured out his solution.

Below is what he told me.

Hi Harlan, thanks! That link helped me find the answer!

FYI: first I downloaded the Android 10.0 SDK.

Then I right clicked on my Android project, went to "General" and updated "Compile using Android version: (Target Framework)" to Android 10.0 (Q).

Then I went to the AndroidManifest and updated the Target Android version to 10.0. Then boom, no more build errors! I guess it didn't like 9.0!

I had been pulling my hair out trying to fix this, thanks again for the link!