Forum General


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Can't run MonoGame (basic openGL project, unable to load SDL_mixxer.dll)

mxanmxan DEMember
edited January 2016 in General

Hi there,
I'm new to C# and Xamarin. I picked it to make a small game for multiple platforms, especially for Linux and Windows. On windows 7 I installed:
-gtk-sharp-2.12.30.msi (couldn't install Xamarin without that)

I created a new Solution for MonoGame Application (Open GL) and tried to run it.
The created program stopped working and Windows dropped me a System.DllNotFoundException.

After Xamarin created the new Solution I get two file conflict warnings:
-OpenTk.dll.config already exists in project. Overwrite it?
-Tao.SDL.dll.config already exists in project. Overwrite it?

If I run “Start Debugging” in Xamarin menu I get two warnings:

-C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(5,5): Warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. (MSB3644)

-C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(5,5): Warning MSB3247: Found conflicts between different versions of the same dependent assembly. (MSB3247)

In program code I get the warning “Unable to load DLL 'SDL_mixer.dll': The specified module could not be found”.

I also installed “NDP451-KB2861696-x86-x64-DevPack.exe”
so then I had:
-Microsoft .NET Framework 4 Multi-Targeting Pack
-Microsoft .NET Framework 4.5.1
-Microsoft .NET Framework 4.5.1 Multi-Targeting Pack
-Microsoft .NET Framework 4.5.1 Multi-Targeting Pack (ENU)
installed on my PC.

Removing version 4 didn't help. Still get the same errors.

Someone has any ideas to fix that?

More detailed:

System.DllNotFoundException: Unable to load DLL 'SDL_mixer.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at at Tao.Sdl.SdlMixer.Mix_OpenAudio(Int32 frequency, Int16 format, Int32 channels, Int32 chunksize)
at at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor(Game game)
at at Microsoft.Xna.Framework.GamePlatform.Create(Game game)
at at Microsoft.Xna.Framework.Game..ctor()
at at projectName.Game1..ctor() in c:\Users\UserName\Documents\Projects\projectName\projectName\Game1.cs:line 21
at at projectName.Program.RunGame() in c:\Users\UserName\Documents\Projects\projectName\projectName\Program.cs:line 30
at at projectName.Program.Main(String[] args) in c:\Users\UserName\Documents\Projects\projectName\projectName\Program.cs:line 52

Best Answer


  • mxanmxan DEMember
    edited January 2016

    Hi, thanks for helping out.

    Where version of MonoGame are you using?

    I used the Add-In version of Xamarin Studio. It is version

    If I add the sdl-package to my solution it throws an error message:
    "Could not install package 'SDL.redist'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework"

    I could add it to References (sdl and tao). ->Solution Working now!!
    Removed again and it is still working... I created a new opengl solution and it's still working without adding anything..
    So the SDL issue is working now! (without doing anything). I don't know why but it is working now, ty.

    The file conflict and the .net Framework warning still remains.

    But I can start program some stuff.

    Only working if I run it with MS .Net, if select mono at the Run menu the mono.exe crash:
    Problem Event Name: APPCRASH
    Application Name: mono.exe
    Application Version:
    Fault Module Name: StackHash_2d06

Sign In or Register to comment.