Here's the problem I'm running into: I wrote a Gtk# program using MonoDevelop and it runs great. But now I want to be able to run it on other Linux boxes without having to install MonoDevelop.
My solution has two projects: the main Gtk# application, and a C# library project upon which it depends. So when I build the main project, it makes MainProject.exe and MainProject.exe.mdb, along with DependencyProject.dll in the bin/Release folder.
I tried running the following command to package it all into a single executable (run from the bin/Release folder):
mkbundle MainProject.exe -o mainproject --deps *.dll
However, I get this error from running that command:
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp' or one of its dependencies. The system cannot find the file specified.
File name: 'gtk-sharp'
at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string,System.Security.Policy.Evidence,bool)
at System.Reflection.Assembly.ReflectionOnlyLoad (System.String assemblyString) [0x00000] in :0
at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean throwOnError) [0x00000] in :0
at IKVM.Reflection.Universe.Load (System.String refname, IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x00000] in :0
at IKVM.Reflection.Universe.Load (System.String refname) [0x00000] in :0
at MakeBundle.QueueAssembly (System.Collections.Generic.List`1 files, System.String codebase) [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp' or one of its dependencies. The system cannot find the file specified.
File name: 'gtk-sharp'
at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string,System.Security.Policy.Evidence,bool)
at System.Reflection.Assembly.ReflectionOnlyLoad (System.String assemblyString) [0x00000] in :0
at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean throwOnError) [0x00000] in :0
at IKVM.Reflection.Universe.Load (System.String refname, IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x00000] in :0
at IKVM.Reflection.Universe.Load (System.String refname) [0x00000] in :0
at MakeBundle.QueueAssembly (System.Collections.Generic.List`1 files, System.String codebase) [0x00000] in :0
I saw a few other Stack Overflow questions with similar problems but none of them offered any practical solutions. How do I use this mkbundle
command effectively?