[英]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: 当使用“ mono”命令在mono下运行C#应用程序时,以下工作有效:
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. 但是,在使用mono的mkbundle2将程序集打包到单个文件中之后,上面的行没有返回预期的结果。
哦,这行得通:
var fileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.