Click or drag to resize
DigitalRuneMonoGame

This topic contains the following sections:

Mono

Mono is an open source implementation of Microsoft’s .NET Framework. It makes the .NET framework available under Linux and Mac OS X.

Mono for Android and iOS

Mono implementations for Android (Xamarin.Android, formerly known as Mono for Android or MonoDroid) and iOS (Xamarin.iOS, formerly known as MonoTouch) are provided by Xamarin. To develop Mono projects for Android or iOS, you need a Xamarin.iOS or Xamarin.Android license from Xamarin.

MonoGame

MonoGame is a cross-platform, open source implementation of the Microsoft XNA Framework. See the MonoGame Website for more information.

Note Note

When the DigitalRune Engine user documentation or class library reference refers to "XNA", it usually refers to both XNA and MonoGame. Many parts of the documentation were written before MonoGame support was added - or before MonoGame even existed.

DigitalRune MonoGame repository

DigitalRune libraries are built against a forked version of MonoGame. The source code repository is publicly available here: https://github.com/DigitalRune/MonoGame

SharpDX

MonoGame uses SharpDX on Windows, Windows Store and Windows Phone.

How to debug SharpDX problems

To get better debug information for graphics and SharpDX problems, you can enable a debug graphics device:

C#
Microsoft.Xna.Framework.Graphics.GraphicsAdapter.UseDebugDevice = true;

During debugging SharpDX will print helpful warning and error messages to the Visual Studio Output window, but only if native code debugging is enabled:

In some project types you have to choose between "Managed Only" or "Native Only". This means, you will have to switch to "Managed Only" if you want to debug your own code. You have to switch to "Native Only" to see SharpDX messages.

  • Open the project properties in Visual Studio.
  • In the Debug tab check the "Enable native debugging" option (Visual Studio | Project | Properties | Debug | Enable native debugging).

    In some project types you have to choose between "Managed Only" or "Native Only". This means, you will have to switch to "Managed Only" if you want to debug your own code. You have to switch to "Native Only" to see SharpDX messages.

See also How to debug a SharpDXException (SharpDX Forum).

Windows Store and Windows Phone 8

Debugging Windows Store and Windows Phone 8 problems

Sometimes when debugging a Windows Store or Windows Phone project, the project does not work and the Visual Studio debugger does not provide any helpful exception messages. For example, a Windows Phone app is started and only a black screen is shown on the phone. This usually means that a problem happened, an exception was thrown but the debugger didn't break at the exception. To get more info about the exception you can try following:

  • Open the Visual Studio | Debug | Exceptions... menu. Check the check box of the Common Language Runtime Exceptions. You can selectively add/remove exceptions, you are not interested in.
  • Or, you can disable "Just My Code" debugging in the Visual Studio options: Uncheck Visual Studio | Options | Debugging | General | Enable Just My Code.