MSBuild.exe关闭 [英] MSBuild.exe closing

查看:455
本文介绍了MSBuild.exe关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,在VS2017中的构建中止后,MSBuild.exe保持活动状态.我发现我应该使用 MSBUILDDISABLENODEREUSE = 1 作为环境变量来告诉VS2017关闭MSBuild.exe实例.但是,我似乎找不到应该在哪里输入此变量的位置.有人能详细告诉我吗?我是编程/VS2017的新手.

Apparently MSBuild.exe stays active after a build in VS2017 is aborted. I found that I should use MSBUILDDISABLENODEREUSE=1 as an environmental variable to tell VS2017 to close the MSBuild.exe instance. Yet I cannot seem to find where I should enter this variable. Could anybody tell me in detail? I'm quite new to programming / VS2017.

推荐答案

有人能详细告诉我吗?

Could anybody tell me in detail?

这是设计使然,自MSBuild 3.5起.子进程将一直持续到15分钟不使用(即不进行构建)为止.在某些情况下,这可以提高性能.很有可能禁用它.

This is by design, since MSBuild 3.5. The child processes persist until 15 minutes has passed without use (ie without a build). This gives some performance gains in some cases. It's quite possible to disable it.

在MSConnect上提交的相关问题: MSbuild激增.

Related issues filed on MSConnect: MSbuild proliferate.

您可以通过设置环境变量和/或msbuild参数来实现.

You can do this by setting and environment variable and/or msbuild arguments.

设置环境变量的详细步骤:

要全局设置"MSBuildDisableNodeReuse"变量,请使用环境变量"属性页,可通过右键单击计算机",单击属性",然后单击系统属性"对话框下的环境变量"按钮进行访问窗口高级"标签:

To set the "MSBuildDisableNodeReuse" variable globally use the "Environment Variables" property page, which is accessed by right-clicking Computer, clicking Properties, and clicking the "Environment Variables" button under the "System Properties" dialog window Advanced tab:

设置msbuild参数的详细步骤:

Detailed step to set msbuild arguments:

msbuild YourApp.sln /nr:false /t:rebuild

请参见准备开发环境了解更多详细信息.

See Prepare the Development Environment for more detailed info.

希望这会有所帮助.

这篇关于MSBuild.exe关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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