TheNextman
TheNextman

Reputation: 12566

Using dllmap on monomac

I'm trying to use a custom build of sqlite with MonoMac, effectively as per this question.

However, using dllmap doesn't seem to be working.

My custom dylib is being deployed into [myapp.app]/Contents/Frameworks/mycustomlib.dylib

Output of otool -L mycustomlib.dylib looks correct:

@executable_path/../Frameworks/mycustomlib.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

My myapp.exe.config file looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
    <dllmap dll="sqlite3" target="@executable_path/../Frameworks/mycustomlib.dylib" os="!windows" />
</configuration>

And I have verified that it is being copied alongside myapp.exe in [MyApp.app]/Contents/MonoBundle.

I can force this to work by recompiling Mono.Data.Sqlite and directly replacing the reference to sqlite3 with mycustomlib. However, the dllmap route is much nicer.

What am I missing? How can I debug this?

Upvotes: 1

Views: 456

Answers (1)

Mark Bowker
Mark Bowker

Reputation: 1244

Move the dllmap configuration from myapp.exe.config to a new Mono.Data.Sqlite.dll.config file for the remaps to take effect.

Upvotes: 1

Related Questions