Moving to Mono.

Hi folks. I’ve just started to move a VB XNA game over to Mono, I’ve got a very blank template that Vogles helped me put together. I’m a bit confused with the Imports I might need.

There only seems to be the one reference for MonoGame, which is the Framework. But this doesn’t include the Texture2D object, and probably others I’m using.

Do I still need the old XNA references, or is my template still missing bits?

Thanks…

(Edit to fix typo’s)

MonoGame.Framework.dll includes everything from XNA 4.0 except for GamerServices and Net, which are in MonoGame.Framework.Net.dll. I don’t know how VB.NET works, but with a reference added for MonoGame.Framework, you will find Texture2D in the Microsoft.Framework.Graphics namespace.

Hmm, in that case this VB template has bigger problems than I’d hoped. I don’t have Game, GraphicsDeviceManager, SpriteBatch, Vector2’s, all sorts.

I’ll have to get back to Vogles.

Thanks Konaju.

You need to add a reference to the MonoGame DLL. Then you can import the namespace.

@MuntyScruntFundle,

if you got my template working, then you have all of the references you should need to get going. The basic Game1 class instantiates a GraphicsDeviceManager and all that jazz.

The main references you should have, either from dlls or Nuget, are MonoGame.PlatformYou’reTargetting, SharpDX (if you’re on Windows-based platforms), SharpDX.Direc3D11, SharpDX.Direct2D1, and SharpDX.DirectIG (I think that’s what it’s called).