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 220.127.116.11
- MonoGame.Framework.DesktopGL.Core 18.104.22.168
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.
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.SdlGamePlatform..ctor(Game game)
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