Migrating to Visual Studio 2019 & Android 10

I’m trying to build for the Android 10 API 29. Seems this SDK is only available in Visual Studio 2019.

I have it installed. I copied the templates across from:
{user_dir}\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\MonoGame
to:
{user_dir}\Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual C#\MonoGame

MonoGame.Framework.Android was complaining until I copied: Monogame, Xamarin, Novell dirs from:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild
to:
C:\Program Files (x86)\MSBuild\

The main project has “(needs migration)” next to it.
“This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.”

Any ideas how to get passed this?

Yeah, I wrote a guide on this, look for it :wink:

I followed all the threads on migrating and it still says needs migration:

“Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the Migration Report” displayed after clicking OK.
- StardewValley.Android, “C:_workspace\stardewvalley_merge\Farmer\Farmer\StardewValley.Android.csproj”

Non-functional changes required
Visual Studio will automatically make non-functional changes to the following projects in order to enable them to open in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1. Project behavior will not be impacted.
- StardewValley.Android, “C:_workspace\stardewvalley_merge\StardewValley.Android.sln”

Then if fails to write the report it promises.
I’m guessing it doesn’t like something in the .csproj

Have you got VS17 installed by any chance?

Yes both 2017 and 2019.

And did you process your project in VS17 then open in VS19?

I don’t know what you mean by process but it compiles fine in 2017.

Did you begin the project in a prior version of VS? I would recommend setting up a fresh project in VS17 and go from there perhaps?

A lengthy process but sometimes it forces you to also take a closer look at the details, usually a good thing in my experience…

All the references have yellow triangles next to them. Even if I start a fresh Monogame Android project, MonoGame.Framework.Android has this and the build fails.

Would advise posting a screenshot of the marked items [Omit any tell-tale data] and by the sounds of it, log an issue on the GitHub? are you using 3.7.1?

If I create a new MonoGame Android Project in 2017, (create the AndroidManifest.xml), build it. That works fine.
Then when I open that in 2019 it says it’s “incompatible”
My hunch is it’s looking for things in the wrong places.
For example this line from MonoGame.Framework.Android.csproj

I had to copy:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Novell
to C:\Program Files (x86)\MSBuild\Novell
and same was true for a few other dirs.

The references to System and System.Core have no path set. In the csproj they are:

<Reference Include="System" />
<Reference Include="System.Core" />

Maybe implying it’s looking in the wrong place and can’t find them. I don’t know where though.