How to create a class library based on MonoGame to be used from UWP, iOS, and Android

I’ve installed VisualStudio 2015, Xamarin, and MonoGame 3.5. I’m going to build my XNA app for Windows UWP, iOS, and Android.

I’ve some libraries based on XNA… and I need to build them for the three target systems (Windows UWP, iOS, and Android), but no way to create a library for Windows UWP. I’ve tried to create a ** MonoGame Windows 10 Universal Project**, but such a project cannot be converted to generate a DLL.

I’ve also tried to create a Class Library (Universal Windows) project, but then I was unable to add MonoGame.Framework to the references.

I’ve the same problem when creating a MonoGame Android Project… no way to switch to a library project. The only MonoGame project that can be modified to be a library project is MonoGame iOS Project.

That said, how can I create a class library based on XNA (MonoGame) to be used from UWP, iOS, and Android?

Hi @j3d.

Just make a plain C# library project and add reference to the MonoGame.Framework assembly.

Note we’re currently working on getting a MonoGame.Framework PCL assembly which would mean you can use just one library and link it with all your different games.

MonoGame Portable Assemblies by tomspilman · Pull Request #4712 · MonoGame/MonoGame · GitHub