I'm trying to set up my application's config file so that it will use the libraries from a specific directory depending on what OS it's on. It sounds really simple, but I've been at it for hours trying all different kinds of configurations and searching online for the answer.
My application uses some native DLLs in a directory named after the OS it's running on (in my case, the "win" directory, but I plan on making "linux" and "osx" directories for the binaries for them too), and in the directory holding those directories are .NET DLLs that have bindings to those DLLs. So, the full layout of the project is the root folder, a "lib" folder with the .NET bindings, and the directories for the OS-specific DLLs.
And, if it helps, to be specific, I'm using SFML with the SFML.Net binding.
So far, I've tried adding *.dll.config files for every (all four) .NET DLLs, as well as simply adding the config to the main *.exe.config file. This is one of my config files, but I've tried a dozen variations of it:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;lib\win" />
</assemblyBinding>
</runtime>
<dllmap os="windows" dll="csfml-system-2" target="\lib\win\csfml-system-2.dll"/>
<dllmap os="windows" dll="csfml-graphics-2" target="\lib\win\csfml-graphics-2.dll"/>
<dllmap os="windows" dll="csfml-window-2" target="\lib\win\csfml-window-2.dll"/>
<dllmap os="windows" dll="csfml-audio-2" target="\lib\win\csfml-audio-2.dll"/>
<dllmap os="linux" dll="csfml-system-2" target="libcsfml-system.so.2.2"/>
<dllmap os="linux" dll="csfml-graphics-2" target="libcsfml-graphics.so.2.2"/>
<dllmap os="linux" dll="csfml-window-2" target="libcsfml-window.so.2.2"/>
<dllmap os="linux" dll="csfml-audio-2" target="libcsfml-audio.so.2.2"/>
</configuration>
I'm not using any IDE, I'm writing the configs myself in my own editor of choice. Thank you for your time.