开发者

How can I determine the file name that is being executed in a mono C# environment when the file was created with mkbundle2?

开发者 https://www.devze.com 2023-01-04 01:22 出处:网络
When running a C# application under mono with the \"mono \" command, the following works: var fileName = System.Reflection.Assembly.GetExecutingAssembly().Location;

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

精彩评论

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