[Mono-osx] Deploying MonoMac Application

Chris Waldron chris.waldron at booktrack.co
Fri Nov 11 00:26:25 EST 2011


I'm having a real difficult time deploying my monomac application with a
3rd party dylib and permission issue.  I'm was able to build and run the
application in MonoDevelop without too much problem.  I was able to add the
3rd party library to the project and set the library to be copied to the
output location and checked the indicator to "include in deploy".

Now when I use the Mac Installer creator tool and deploy the application I
get some really weird errors:

[1] The first problem is when the application run it failed on
Activator.CreateInstance.  I have no idea why it fails in deployment but
during testing in the IDE.  In order to circumvent this problem I changed
my code to only do early bound creation rather than late bound creation.
 This is lame but I've got a deadline to meet.

[2] After changing my code to only do early bound creation, I was able to
get around those errors until the application failed on a
DLLMissingException.  This was puzzling as I thought the Installer creation
tool would properly embed the 3rd party library in the application.  Do
some inquiries, I was able to find a solution that suggest you have to do
some post processing to embed the lib.  It was suggested that the lib be
placed into *.app/Contents/Frameworks directory.  The problem with that
however is that the library is still missing and altering the DllImport
still didn't resolve the DLL missing issue.

[3] Next I tried post possessing the library into the MonoBundle folder.
 The post processing step worked but then the MacInstaller step of
MonoDevelop complained that the temporary folder could not be created and
failed the application bundling.  Apparently I could not post process into
the MonoBundle folder without disrupting MonoDevelop MacInstaller.  So I
went back to injecting the 3rd Party library back into the Frameworks
folder and then I manually copied the 3rd Party library into the MonoBundle
folder.

[4] I tried running the application again but now I'm getting permission
errors when trying to read Content out of the bundle.  I don't know if my
manual copying the 3rd Party Library affected the application permission or
whether I need to set some permission when reading Content out of the
application.  Again the application works without any of these alteration
when I run it out of the IDE.

To boil it down.  What I want to do is to bundle and deploy a MonoMac
application that contains a 3rd party dynamic library.

If anyone has experience this problem and can provide some insight and
information I'd greatly appreciate it.

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20111111/390312d4/attachment-0001.html 


More information about the Mono-osx mailing list