Closed OmidID closed 6 years ago
Isn't it mono's default operation? Do you have a sample repo for reproducing the problem?
https://linux.die.net/man/5/mono-config For each assembly loaded a config file with the name: /path/to/the/assembly.exe.config is loaded
@techcap No it's not default. If you have a GTK application you cannot run it directly and you can see the error .dll not found. It's happen in Linux only. And you need to map all .dll to .so files
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<dllmap dll="i:cygwin1.dll" target="libc.so.6" os="!windows" />
<dllmap dll="libc" target="libc.so.6" os="!windows" />
<dllmap dll="intl" target="libc.so.6" os="!windows" />
<dllmap dll="intl" name="bind_textdomain_codeset" target="libc.so.6" os="solaris" />
<dllmap dll="libintl" name="bind_textdomain_codeset" target="libc.so.6" os="solaris" />
<dllmap dll="libintl" target="libc.so.6" os="!windows" />
<dllmap dll="i:libxslt.dll" target="libxslt.so" os="!windows" />
<dllmap dll="i:odbc32.dll" target="libodbc.so" os="!windows" />
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx" />
<dllmap dll="oci" target="libclntsh.so" os="!windows" />
<dllmap dll="db2cli" target="libdb2_36.so" os="!windows" />
<dllmap dll="MonoPosixHelper" target="libMonoPosixHelper.so" os="!windows" />
<dllmap dll="i:msvcrt" target="libc.so.6" os="!windows" />
<dllmap dll="i:msvcrt.dll" target="libc.so.6" os="!windows" />
<dllmap dll="sqlite" target="libsqlite.so.0" os="!windows" />
<dllmap dll="sqlite3" target="libsqlite3.so.0" os="!windows" />
<dllmap dll="libX11" target="libX11.so.6" os="!windows" />
<dllmap dll="libgdk-x11-2.0" target="libgdk-x11-2.0.so.0" os="!windows" />
<dllmap dll="libgtk-x11-2.0" target="libgtk-x11-2.0.so.0" os="!windows" />
<dllmap dll="libXinerama" target="libXinerama.so.1" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx" />
<dllmap dll="libcups" target="libcups.so.2" os="!windows" />
<dllmap dll="libcups" target="libcups.dylib" os="osx" />
<dllmap dll="i:kernel32.dll">
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory" />
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory" />
<dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory" />
<dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory" />
</dllmap>
<dllmap dll="gdiplus" target="libgdiplus.so" os="!windows" />
<dllmap dll="gdiplus.dll" target="libgdiplus.so" os="!windows" />
<dllmap dll="gdi32" target="libgdiplus.so" os="!windows" />
<dllmap dll="gdi32.dll" target="libgdiplus.so" os="!windows" />
<dllmap os="linux" dll="libglib-2.0-0.dll" target="libglib-2.0.so.0" />
<dllmap os="linux" dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0" />
<dllmap os="linux" dll="libgthread-2.0-0.dll" target="libgthread-2.0.so.0" />
<dllmap os="linux" dll="glibsharpglue-2" target="libglibsharpglue-2.so" />
<dllmap os="!windows,osx" dll="libatk-1.0-0.dll" target="libatk-1.0.so.0" />
<dllmap os="!windows,osx" dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0" />
<dllmap os="!windows,osx" dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0" />
<dllmap os="!windows,osx" dll="libpango-1.0-0.dll" target="libpango-1.0.so.0" />
<dllmap os="!windows,osx" dll="libpangocairo-1.0-0.dll" target="libpangocairo-1.0.so.0" />
<dllmap os="!windows,osx" dll="libwebkitgtk-1.0-0.dll" target="libwebkitgtk-1.0.so.0" />
<dllmap os="!windows,osx" dll="fontconfig" target="libfontconfig.so.1" />
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
</startup>
</configuration>
I have article in my weblog about it. http://omidid.com/topic/MonomkbundleHowtoexportstandaloneUIapplicationonLinuxbaseonGTK Reproduce it is really simple just create a GTK application and try to debug it on linux. that's all.
👍
GTK application can work only with config files. Because mono need to map dll files to .so files