views:

24

answers:

1

When running a C# application under mono with the "mono " command, the following works:

var fileName = System.Reflection.Assembly.GetExecutingAssembly().Location;

But after packaging the assemblies into a single file using mono's mkbundle2, the line above does not return the expected result.

A: 

Oh, this works:

var fileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
Fantius