Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1002557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:50:52+00:00 2026-05-16T07:50:52+00:00

I have a very simple .NET commandline application that I want to port to

  • 0

I have a very simple .NET commandline application that I want to port to OS X.
I can run it with “mono app.exe”
However, the destination machines won’t have mono installed.
So, I wanted to bundle mono inside the app.

In order to do this, I used mkbundle2:

mkbundle2 -o bundledapp.exe app.exe --deps

This works without errors, output:

OS is: Darwin
Sources: 1 Auto-dependencies: True
  embedding: /Users/kclement/Projects/app/build/app.exe
  embedding: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/2.0/mscorlib.dll
  embedding: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll
  embedding: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/gac/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  embedding: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/gac/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
  embedding: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/gac/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
  embedding: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/gac/Mono.Security/2.0.0.0__0738eb9f132ed756/Mono.Security.dll
Compiling:
as -arch i386 -o temp.o temp.s 
cc -g -o bundledapp.exe -Wall temp.c `pkg-config --cflags --libs mono`  temp.o
Done

I can execute this on the build machine. When I execute on a machine without mono however, it won’t run.

Output:

dyld: Library not loaded: /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/libmono.0.dylib
  Referenced from: /Users/kristof/./bundledapp.exe
  Reason: image not found
Trace/BPT trap

What am I missing? How do I include the actual mono runtime?

EDIT:
I also tried adding the –static flag.
That gives my app another license however, which I’m not sure I want.
I then no longer complains about libmono, but about libgthread-2.0.0.dylib

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:50:52+00:00Added an answer on May 16, 2026 at 7:50 am

    So, the problem is that mkbundle links to some file that reside on my mac, where I expected it to bundle them. You can clearly see that by looking up the linked resources with the command:

    otool -L ./BundledApp
    

    (where bundledApp is the output of mkbundle2)

    In order to fix it, I ended up using the mkbundle nant-tasks from the monobjc project:
    http://www.monobjc.net/index.php?page=mkbundle-task

    I think they are pretty much an automated version of what I found here:
    http://code.google.com/p/cocoa-sharp-dev/wiki/RedistributableAppWithoutInstallingMono
    But that gave me exceptions.

    The Monobjc nant task works without any issues, and is by far the easiest solution. I still have multiple files but that’s ok, at least it works now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple ASP.Net page that acts as a front end for
I have a very simple question. I want to test whether a particular port
i have very simple problem. I need to create model, that represent element of
I have a very simple WPF application in which I am using data binding
I have a very simple bit of script that changes the status of an
I have a very simple Java RMI Server that looks like the following: import
i have a very simple question I can't seem to get my head around.
I have written a VERY simple MVC application which just displays a single string
I have put together a small ASP.NET MVC 2 site that does some very
I'm making a very simple WCF (C#, .NET 4.0) licensing program that automatically emails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.