开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜