I made a C# GTK# application in MonoDevelop for a college assignment only to discover that it won't run on the college computers because we don't have admin rights to install the GTK# or Mono libraries. After some research, I discovered the technique of using mkbundle in Cygwin to bundle the required DLLs with the executable. I followed these instructions:
http://www.joebest.org/2011/09/mono-and-mkbundle-on-windows.html
Since I can't test on the college computers while I'm at home, I'm testing on a virtual machine with a completely clean install of Win 7 Pro 64-bit. My development machine runs the same OS, but here's no point testing on my dev machine because it's already got all the libraries it needs and I don't get any errors.
I can create the bundled executable just fine, no hassles there. The bundled executable runs fine on my dev machine. When I try to run it on the clean Win 7 install nothing happens. No window appears; no error message; nothing. I only know it's running because I can see its name appear for a moment or two in Task Manager's Processes tab when I double-click the executable.
For comparison, if I try to run the unbundled application, it gives an error message saying I need to install the .NET 4 runtime. If I install the .NET 4 runtime (I know the college computers have .NET 4 installed), then the application crashes with this error:
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: keycommandeditor.exe
Problem Signature 02: 1.0.4560.18753
Problem Signature 03: 4fe8f352
Problem Signature 04: glib-sharp
Problem Signature 05: 2.12.0.0
Problem Signature 06: 4e383483
Problem Signature 07: 2bc
Problem Signature 08: 0
Problem Signature 09: System.DllNotFoundException
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 0bff
Additional Information 2: 0bff8d176610735333c3986b545525d3
Additional Information 3: 9af1
Additional Information 4: 9af19ba95df508dd9c076f2be86ba847
I have added all the DLLs that showed up in the mkbundle output to the application's folder. If I remove glib-sharp.dll from the folder, the error becomes:
Problem signature:
Problem Event Name: APPCRASH
Application Name: KeyCommandEditor.exe
Application Version: 1.0.4560.18753
Application Timestamp: 4fe8f352
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdbdf
Exception Code: e0434352
Exception Offset: 0000b727
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
I have also tried changing the 32BIT flag using CorFlags.exe, but it doesn't appear to have any effect on anything.
I'm just wondering if anyone knows the next thing to try, because I'm totally stumped by this.