I am writing my own game engine in XNA and started to port it into MonoGame so that I can put it on Android/iOS/Windows 8. For some reason I am getting a null reference exception when the main create a new game object. So the code that allocates the object is:
static void Main(string[] args)
{
//game g = new game();
using (game game = new game())
{
game.Run();
}
}
and the error is as
public lesaEngine()
which is the base constructor for the game object.
the inheritance is just as always
class lesaEngine : Microsoft.Xna.Framework.Game
class game : lesaEngine
Not sure whats going on here. It works normally under normal XNA. I am using Visual Studio 2012 for the port.