Using NuGet packages to create cross mobile game

Hi MG community,

I am trying to setup the architecture for the monogame for Android and iOS.
I would prefer if I could use NuGet packages to achieve this, but I am finding it really hard to do so.

My idea is to have something like this:

  • Xamarin.Android app project
  • Xamarin.iOS app project
  • Shared project with Content
  • NET standard project for game

Android and iOS project would just keep an entry point an start the game
“MainGame” would be contained in the Shared project
NET standard project would contain the game logic, and receiving interfaces to do so (like ISpriteBatch wrapper and so on)

But I am stuck on even trying to make Shared + Android project work

What I did so far:
New Xamarin.Android app, install NuGets MonoGame.Framework.Android, MonoGame.Content.Builder
New Shared project which contains the MainGame and is referenced inside the Android app

Issue is I cannot make the Content work, I cannot get the MonoGameContentReference Build Action for it, I suppose it comes from Content.Builder targets as I found here: Content in shared project
But I suppose that comes with the MonoGame installation, and I would like to avoid that
I thought that maybe NuGet installation for MonoGame.Content.Builder would provide that in the .csproj of Android project so I could move it to .shproj for Shared

I suppose NuGets are there to make MonoGame work without installing it, but I cannot figure it out how…

Any help would be appreciated :slight_smile: