Error message while loading sprites

0

Before the game starts, I load all my sprites(more than 500 .xnb files), but then I always get this error message:

An exception of type 'SharpDX.SharpDXException' occurred in SharpDX.DLL but was not handled in user code Additional information: HRESULT: [0x887A0005], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_DEVICE_REMOVED/DeviceRemoved], Message: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. If there is a handler for this exception, the program may be safely continued.

I have more than 500 lines(in one class) that look like this:

Sprite = content.Load<Texture2D>("Name");

The error message appears not every time in the same line of code, sometimes it appears one line earlier. The only way to avoid the error message is to delete some of the lines. Then the game runs normally. But I need to load all the sprites and not only a part of it.

What does the error message mean? Is it possible to load more sprites without having this error message? I tested my game on a Nokia Lumia 920 device and I use MonoGame 3.2.

c#
monogame
asked on Stack Overflow Apr 12, 2015 by Tom

1 Answer

0

in Content folder click on your file(here Name) go to property and set Build Action to Content and copy to output directory to Copy always

answered on Stack Overflow Apr 18, 2015 by ako

User contributions licensed under CC BY-SA 3.0