How can I determine the file name that is being executed in a mono C# environment when the file was created with mkbundle2?
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 m开发者_如何学运维kbundle2, the line above does not return the expected result.
Oh, this works:
var fileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
精彩评论