[SOLVED] MonoGame.Portable & Nez

I’ve been trying to get the Nez engine to build with MonoGame 3.6 from the develop branch. And failing, so this is me widening the net beyond the Nez subforum now.

My problem right now is building a MonoGame PCL to replace the 3.6.0.121 PCL bundled with the Nez project. If I can do that, I think I should be able to build a 3.6 Nez and related.

(1) MonoGame.Framework.Portable from NuGet doesn’t install:

Installing MonoGame.Framework.Portable 3.6.0.1503-develop.
Completed installation of MonoGame.Framework.Portable 3.6.0.1503-develop
For adding package 'MonoGame.Framework.Portable.3.6.0.1503-develop' to project 'Nez' that targets 'portable45-net45+win8+wpa81'.
Install failed. Rolling back...
Package 'MonoGame.Framework.Portable.3.6.0.1503-develop' does not exist in project 'Nez'
Package 'MonoGame.Framework.Portable.3.6.0.1503-develop' does not exist in folder '/Users/girv/projects/_frameworks/engines/Nez/packages'
Could not install package 'MonoGame.Framework.Portable 3.6.0.1503-develop'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I tried changing the target of Nez but I’m not sure what I should change it to and it gave hundreds of compilation errors anyway.

(2) I can build my own MonoGame PCL by building MonoGame.Framework.MacOS and stripping the result down with Piranha according to these instructions, but then the Game.Window property seems missing when I try to build Nez:

…which I have no idea about.

This is in the latest Xamarin Studio 6.1.5 Community.

I’m not super familiar with the .NET ecosystem (Java & C++ mostly) so I’m hoping I’m just doing something stupid. Any ideas?

Not stupid, but I’d missed an obvious trick.

Rather than install the package, I just referenced the .dll from MonoGame.Framework.Portable NuGet into the Nez projects and it just worked.

Emoji for slapping self on head?

Success! !!! (20 character min)

Not quite. Just on to the next problem: recompiling the effects for 3.6 on a Mac :smiley:

System.Exception: This MGFX effect is for an older release of MonoGame and needs to be rebuilt.

At least that’s a simple one (assuming 3.6 is at least somewhat stable now). You can just stick any shaders that you need in an empty project and let MGCB do all the work.

Hello there,

I have the same question for MonoGame portable 3.2.99.1-beta (the previous release). I installed the package through NuGet and everything is working fine albeit this missing Window property. Did I miss something?