Receiving an error trying to use latest version of DesktopGL framework

I get an error trying to compile the code received when creating a new solution:

{Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device! —> System.EntryPointNotFoundException: SDL_SetWindowResizable
at (wrapper managed-to-native) Sdl+Window:SetResizable (intptr,bool)
at Microsoft.Xna…}

But this only occurs during the latest version of Monogame.Framework.DesktopGL (3.6.0.1625). When i use the previous version (3.5.1.1679) it works fine. At first i thought this was because i was running on old Monogame and Mono versions but i checked both and they are up to date. I even tried to uninstall everything and install everything in the order: Mono → MonoGame → Rider.

As i am dumbfounded to why this occurs, i had to ask here if there’s something i could possibly miss and suggestions on how to proceed? If i should work with the old versions and let it run on old code or if there’s another solution.

Development environment:
OS: Bodhi Linux 4.2.0 64-bit.
IDE: Jetbrains Rider (I’ve also tried MonoDevelop but same result, just can’t downgrade versions in MonoDevelop)
Mono: version 5.0.1.1
Monogame: version 3.6

Working Monogame.Framework.DesktopGL version is 3.5.1.1679 but i want to use 3.6.0.1625 (currently latest version).

You are missing the SDL dll. MonoGame started using SDL for the backend in 3.6, the dll is included in the new templates, but if you upgrade an older application you have to add the .dll. If you play sound in your game you also need to add the OpenAL Soft depency. You’ll find the dlls in the MonoGame installation folder. Alternatively you can start a new project from a template and copy over the files (this is the easiest way, but currently only works with MonoDevelop).

Thanks for the reply,

I don’t have a template to go after. I created Game1.cs and Program.cs myself and added code that was the same as what the template gives you. I started looking into templates more and several wrote that you get templates from installing monogame. But i neither have the choice of choosing monogame template in Rider nor in MonoDevelop. Is there another way to get the SDL.dll or any idea to get templates working to get the SDL.dll that way?

If you have MonoDevelop 6 installed and then install MonoGame you should get the templates working (I hope I got the version right, they change the addon API like every version so MG is not compatible with other versions). If you have MonoGame installed, the dll should also be in the installation folder. Though I’m not sure where that is exactly on Linux. If you can’t find it you can get the dependencies from the MG Dependencies repo here or just install SDL2 using your distros package manager, that should work as well (note that you may want to include the dependencies when shipping/publishing your game).

If you remove the MonoGame References, you can install the Latest NuGet’s for MonoGame to get around that issue.

It will automatically update and include the SDL references.

Although you may need to use the Dev NuGet feed listed on the MonoGame downloads page for that version.

Any issues, let me know.

Hi Simon,

That was not doing anything sadly. Same error.
I tried to remove Monogame reference and install the latest monogame.framework.DesktopGL again but nothing changed.

I’ve been having similar trouble with windowsdesktop (except the exception message says something about missing the type “Sharpdx.Rectangle”). But I just tried desktopgl and also get an error regarding a missing sdl2.dll.

EDIT: Oh well, I just downloaded the SDL binaries and included them. Desktopgl works fine for me after all :D.