I just tried to create a project and was getting this error too. The only way I could get it to work was to use a project that was created on a Windows computer. Maybe it puts the SDL libraries in the correct place.

I have exactly the same problem, but I found it compiles on macOS 10.13.6 (High Sierra), but produces the error on macOS 10.15.3 (Catalina). I triple-checked all the installed path, and actual paths in source code, and they are all same on two machines. Why is it so and how can I fix it (if possible)? Any help would be appreciated.

I am using:

VS 2019 for Mac 8.4.8

.NET Core SDK 3.1.101 for template creation

MonoGame.Content.Builder 3.7.0.9

MonoGame.Framework.DesktopGL.Core 3.8.0.2

What I do to compile:

I created a project in CLI using dotnet core (dotnet new mgdesktopgl -o mygame), opened it on VS 2019 for Mac, and pressed big shinny “Run” button.

Adding my error msg here for more clarity:

Unhandled exception. System.TypeInitializationException: The type initializer for 'Sdl' threw an exception. ---> System.Exception: Failed to load SDL library. at Sdl.GetNativeLibrary() at Sdl..cctor() --- End of inner exception stack trace --- at Microsoft.Xna.Framework.SdlGamePlatform..ctor(Game game) at Microsoft.Xna.Framework.Game..ctor() at mg_launch_test.Game1..ctor() in /Users/myusername/dev/mg-launch-test/Game1.cs:line 12 at mg_launch_test.Program.Main() in /Users/myusername/dev/mg-launch-test/Program.cs:line 10