mono/MonoGame — pull request #3032 by jolmos (2014-09-29 14:43:39+00:00)
Title: PR3031 Enhance support for Windows 2008 server over remote desktop 

I will just repeat what I stated in Issue 3031:

I can run my monogame program on several windows 7 and XP, without any trouble.
When I try to run it on Windows 2008R2 Server accessed via remote desktop/spice (I have reproduced it on two virtual machines, one of them just installed and updated) it fails with exception:

Unhandled Exception: SharpDX.SharpDXException: HRESULT: [0x887A0004], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unknown
at SharpDX.Result.CheckError()
at SharpDX.Direct3D11.Device.GetSupportedFeatureLevel()
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformGetHighestSupportedGraphicsProfile(GraphicsDevice graphicsDevice) in c:\MinGW\msys\1.0\home\nologin\monogame\MonoGame\MonoGame.Framework\Graphics\GraphicsDevice.DirectX.cs:line 1237
at Microsoft.Xna.Framework.GraphicsDeviceManager..ctor(Game game) in c:\MinGW\msys\1.0\home\nologin\monogame\MonoGame\MonoGame.Framework\GraphicsDeviceManager.cs:line 67
at myPackage.myGame..ctor() in c:\ [...] \myGame.cs:line 123

According to http://msdn.microsoft.com/en-us/library/windows/desktop/bb509553%28v=vs.85%29.aspx
that exception means:
DXGI_ERROR_UNSUPPORTED 0x887A0004 The requested functionality is not supported by the device or the driver.

Debugging monogame, I have also found that on the 2008 machine I can´t create a GrapchicsDevice with DriverType.Hardware (Reference and Warp drivers are ok), or with any FeatureLevel (not even 9_1).

I want to be able to run the program on windows 2008 server boxes, which needs the following corrections:

Let the program run, although GetSupportedFeatureLevel() fails.
Let the programmer choose the driver type (not only Reference driver, as it is supported now, but Warp too, which is faster)
Check for supported FeatureLevels before requesting them, and if they are not supported, do not request them to the SharpDX.Direct3D11.Device constructor