从构建创建禁用* .vshost.exe和其他文件 [英] Disabling the *.vshost.exe and miscellaneous files from being created on build

查看:187
本文介绍了从构建创建禁用* .vshost.exe和其他文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现有关Microsoft Visual Studio的额外的文件中的下列信息:

I found the following information about the Microsoft Visual Studio "extra" files:

什么是vshost.exe文件的目的是什么?

我的问题是,有没有办法,我不能有.PDB,以及名为.manifest文件vshost.exe被制成?或者,他们绝对必要的?

My question is, is there a way that I can NOT have the .pdb, .manifest and vshost.exe files from being made? Or are they absolutely necessary?

我只注意到,在调试之后,它仍然显示为在我的机器运行的过程,让我担心,因为我已经关闭了。

I just noticed that after debugging it, it's still showing up as a running process in my machine which worries me since I already closed it.

推荐答案

切换到Release配置。然后,项目+属性,调试选项卡,取消勾选启用在Visual Studio宿主进程选项。构建清洁+,你可以删除任何东西剩下的,它不会再回来了。这个选项默认是开启的发布版本是,可以说,有点瑕疵,但守难攻。

Switch to the Release configuration. Then Project + Properties, Debug tab, untick the "Enable the Visual Studio hosting process" option. Build + Clean, you can delete anything that's left and it won't come back. That this option is turned on by default for the Release build is, arguably, a bit of a flaw but defensible.

托管进程是CLR的定制托管版本。究竟它是什么没有很好的记载,但它涉及到配置主应用程序域的安全设置。我从来没有听过​​有人抱怨作战CAS的问题,没有它,但它是不寻常的将其关闭,您的应用程序从IDE调试时在充分信任几乎始终运行。如果你建立一个网络共享.NET的早期版本会的问题。这是显而易见的,从禁用它的唯一的事情是什么,你在GUI风格的应用程序与Console.Write写将不再出现在输出窗口。如权利中的链接高度upvoted答案它无关的速度,核心框架的DLL已经驻留在内存中,因为VS和MSBuild的使用它们。

The hosting process is a custom hosted version of the CLR. Exactly what it does is not well documented but it is related to configuring the security settings of the primary AppDomain. I've never heard anybody complain about battling CAS problems without it, but then it is unusual to turn it off and your app almost always runs in full trust when debugging from the IDE. It would matter if you build to a network share on early versions of .NET. The only thing that's obvious from disabling it is that anything you write with Console.Write in a gui style app will no longer appear in the Output window. It has nothing to do with speed as claimed in the highly upvoted answer in the link, the core framework DLLs are already resident in RAM since VS and MSBuild uses them.

做的仅仅是不用担心太多最好的事情。一个安装和部署项目将忽略它。

Best thing to do is just not worry about it too much. A Setup and Deployment project will ignore it.

这篇关于从构建创建禁用* .vshost.exe和其他文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆