It is simply not possible at the moment to work with Xamarin.Android projects from the dotnet CLI until .NET 6 will be out in November 2021. See comments / discussion on GitHub https://github.com/MonoGame/MonoGame/issues/7350
So for MonoGame Kickstarter this means that while the
mgwindowsdx projects can be setup automatically by the script and everything just works for Android you would have to do some steps by hand.
Using e.g. Visual Studio 2019 the additional steps after running the MonoGame Kickstarter script (with Android project generation enabled to have it generate the project template) are:
- Open the solution and add the Android project
- Add a reference to the Android project to the
- Inside Visual Studio delete or exclude the
Game1.cs from the Android project (it should be marked as not found already because it was deleted already on disk by the script)
- Right click the Android project and select
Set as Startup Project from the context menu.
- Add to line 68 in the
android.csproj an entry for the content from the NetStandardLibrary project so the shared content is available (replace SOLUTIONNAME !!!).
<MonoGameContentReference Include="..\SOLUTIONNAME.NetStandardLibrary\Content\Content.mgcb" Visible="false" />
This way the Android project has content available from the shared content mgcb from the NetStandardLibrary project and also the default content which the template provides for Android projects.
I pushed everything to GitHub to the
android branch if yomebody wants to test it. The script will also output the info about how to do the manual steps.
At this point the manual steps are not tested very much. I will test it if I have more time.