question

njsokalski avatar image
0 Votes"
njsokalski asked ·

Version Settings For Xamarin.Android Solutions & Projects

This is probably a question for which I dug my own hole, but here it is. Somewhere along the line after attempting to add a Class Library Project to my Solution (which previously contained only a single Xamarin.Android Project) I ended up changing some settings that give me the following error:

Project XXX is not compatible with monoandroid 10.0 (MonoAndroid, Version=v10.0). Project XXX supports: netcoreapp3.1 (.NETCoreApp, Version=v3.1)

My app does not use any complex or recently added features, so what version I make it right now is not of high significance, although I do plan on updating & compiling it for the latest versions of .NET & Android when Android 11 is released near the end of 2021. What do I need to do to make the version settings in the Class Library & Xamarin.Android App work well together? Thanks.

dotnet-androiddotnet-xamarinessentials
· 7
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @njsokalski , you can try to update your nugets to the latest version, and try again.

0 Votes 0 ·
njsokalski avatar image njsokalski JessieZhang-2116 ·

All of my NuGet packages are updated (as far as I know). Here are screenshots of the NuGet(s) from the Xamarin.Android project & the Class Library project:
![75449-screenshot-2021-03-08-125329.png][1]
![75459-screenshot-2021-03-08-125846.png][2]
I don't know if I might be missing any packages (although I didn't delete any before adding the class library, and it was working that, and the error seems to imply more of a version/compatibility problem than a missing problem). Do I need to somehow reinstall the NuGet(s)? Is there a way to confirm that all the configuration settings & files are correct?
[1]: /answers/storage/temp/75449-screenshot-2021-03-08-125329.png
[2]: /answers/storage/temp/75459-screenshot-2021-03-08-125846.png

0 Votes 0 ·

Could you please post a basic demo to github or onedriver so that we can test on our side?

0 Votes 0 ·

It was probably lazy and inefficient of me, but since I didn't have any hugely complex code yet, I just recreated a new Solution & Projects. It's now working, so hopefully I'm careful enough in the future to avoid this, it probably would have gotten me fired on the spot if it happened at a job!

0 Votes 0 ·

Have you resolved your problem, right? Congrats. Thanks for your support for xamarin.

0 Votes 0 ·
njsokalski avatar image njsokalski JessieZhang-2116 ·

I suppose you could call it resolved, although it might be better described as "throwing the problem away" rather than "finding the solution to the problem", since I literally created a whole new Solution & Projects, manually changed the configuration, and all code was copy & pasted into new files (sort of like buying a new house instead of fixing your old one). But it works now, so hopefully as I gain experience I will be able to actually fix instead redo in the future. But the current situation is what I want, so I may have lost a little dignity, but at least I can now continue development!

0 Votes 0 ·
Show more comments

0 Answers