为什么 AppDomain.CurrentDomain.SetupInformation.ApplicationName 返回 exe 文件的 svhost 版本
我正在使用方法 AppDomain.CurrentDomain.SetupInformation.ApplicationName 来获取可执行文件名,但我得到的不是这个名称
Appname.svhost.exe
,而是应该是:
Appname.exe
为什么是这样?
更新
因此,当 Visual Studio 打开时,它会保留 Appname.svhost.exe
用于调试目的 + Appname.exe
如果我运行应用程序。所以我关闭了 Visual Studio 并运行应用程序,在这种情况下 AppDomain.CurrentDomain.SetupInformation.ApplicationName
正在做这件事。但问题是,当项目打开时,是否可以使用 AppDomain.CurrentDomain.SetupInformation.ApplicationName
返回 Appname.exe
?为什么会出现这样的行为?
I am using method AppDomain.CurrentDomain.SetupInformation.ApplicationName
to get executable file name but instead of that i am getting
Appname.svhost.exe
but should be:
Appname.exe
Why it is like that?
UPDATE
So when when visual studio opened it is keeping Appname.svhost.exe
for debugging purposes + Appname.exe
if i run application. SO i closed visual studio and run app, in that case AppDomain.CurrentDomain.SetupInformation.ApplicationName
doing the thing. But the question is is it possible to get return Appname.exe
with AppDomain.CurrentDomain.SetupInformation.ApplicationName
when project opened? and why it is such behavior?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
Try: