For my project I have three DLLs:
- sfmlnet-audio-2.dll
- sfmlnet-graphics-2.dll
- sfmlnet-window-2.dll
I am using Linux however, so I have to map the correct DLLs using .dll.config files:
- sfmlnet-audio-2.dll.config
- sfmlnet-graphics-2.dll.config
- sfmlnet-window-2.dll.config
Now the contents of sfmlnet-graphics-2.dll.config are the following:
<configuration>
<dllmap os="linux" dll="csfml-graphics-2" target="libcsfml-graphics.so.2" />
</configuration>
This goes all fine and dandy. However, when I try to access particular window functions, like RenderWindow.Close(), I'm getting the following error:
Unhandled Exception:
System.DllNotFoundException: csfml-window-2
at (wrapper managed-to-native) SFML.Graphics.Context:sfContext_create ()
at SFML.Graphics.Context..ctor () [0x00000] in <filename unknown>:0
at SFML.Graphics.Context.get_Global () [0x00000] in <filename unknown>:0
at SFML.Graphics.Font.Destroy (Boolean disposing) [0x00000] in <filename unknown>:0
at SFML.ObjectBase.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
at SFML.ObjectBase.Finalize () [0x00000] in <filename unknown>:0
While in fact, I do have sfmlnet-window-2.dll.config with the following contents:
<configuration>
<dllmap os="linux" dll="csfml-window-2" target="libcsfml-window.so.2" />
</configuration>
I have checked the existence of the SO file, and it's there. It's strange situation, because the graphics library gets loaded fine, but somehow the window config does not get loaded (I think), as it's not even changing the dll to the target. I also made sure all DLLs are added as a reference in the project, so that can't be it...