Visual Studio Professional 2015(更新3)构建过程停止工作,错误消息显示“内存不足” [英] Visual Studio Professional 2015 (Update 3) build process stops working and error message shows "Out of Memory"

查看:155
本文介绍了Visual Studio Professional 2015(更新3)构建过程停止工作,错误消息显示“内存不足”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2015中遇到这个问题,编译过程(MSBuild * 32.exe和conhost#32.exe来命名一对)没有正确清理,导致构建过程停止工作。然后,这会导致Visual Studio的新实例无法启动,并显示"内存不足"。弹出窗口。

I'm having this issue with Visual Studio 2015 where the compile processes (MSBuild*32.exe and conhost#32.exe to name a couple) are not properly cleaning up which causes the build process to stop working. This then causes new instances of Visual Studio to not start up and shows an "Out of Memory" pop up window.

所以这就是我在做什么以及会发生什么:

So here is what I was doing and what happens:


  1. 我有3个VS 2013,2个VS 2015和1个VS 2010实例,每个
  2. ="颜色:#1f497d"中加载了不同的解决方案/项目如果其他两个VS 2013实例在加载其他解决方案/项目的情况下运行,则在每个实例中针对不同的配置进行多次编译,然后关闭它们
  3. 已经在VS 2013和VS 2015中多次在不同的项目中编译 - C ++项目都是非托管和托管的 - 也是一个C#项目
  4. 试图编译在使用VS 2013编译器的VS 2015 IDE中 - 启动构建,它只报告"任务被取消"。 我切换到其中一个VS 2013实例来构建一个不同的项目并获得相同的消息。 
    即使设置了诊断输出,这也是编译显示的唯一消息(在VS实例中加载的解决方案中,每个项目有一个"任务被取消"消息)。 当我尝试编译一个C#项目时,我只得到一条失败消息(==========构建:
    0成功,1失败,1最新,0跳过==== ======)并且编译过程中没有其他输出消息。
  5. 使用任务管理器,我看到两个MSBuild.exe *我手动杀死的32个进程 - 再次尝试编译但仍然没有快乐
  6. 我还看到42个conhost.exe进程在任务管理器中显示为零正在使用的处理器。 当我尝试进行另一次编译时,这种情况会持续增长。 我还看到MSBuild.exe * 32进程继续添加这样的
    ,我现在有59个进程都是零处理器。 我还看到了一个MSBuild.exe * 32进程,该进程没有用户名但出现在我的任务管理器列表中。 我杀了它但它仍然没有释放编译重新开始。
  7. 当我尝试启动任何VS的另一个实例时我得到了一个"内存不足"的弹出窗口。 即使我停止所有VS的运行并手动终止MSBuild和conhost进程,它仍然不允许VS再次启动,除非
    我注销并再次登录。
  1. I have 3 VS 2013, 2 VS 2015 and 1 VS 2010 instances running with different solutions/projects loaded in each
  2. Had two other VS 2013 instances running with other solutions/projects loaded, did multiple compiles in each of them for different configurations and then closed them
  3. Had compiled in VS 2013 and VS 2015 multiple times on different projects – C++ projects both unmanaged and managed – also one C# project
  4. Trying to compile in VS 2015 IDE using VS 2013 compiler – start build and it only reports "A task was cancelled".  I switch over to one of the VS 2013 instances to build a different project and get the same message.  Even with diagnostic output set this is the only message shown for the compile (one "A task was cancelled" message per project in the solution loaded in the VS instance).  When I try to compile a C# project I just get a failure message (========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========) and no other output messages from the compile process.
  5. Using Task Manager, I saw two MSBuild.exe*32 processes which I killed manually – try compile again and still no joy
  6. I also see 42 conhost.exe processes showing in task manager with zero processor being used.  This continues to grow when I try to do another compile.  I also see that MSBuild.exe*32 processes continue being added such that I now have 59 of them all taking zero processor.  I also saw a MSBuild.exe*32 process that did not have a username but showed up in my list on the task manager.  I killed it but it still did not free up the compile to start again.
  7. When I try to start another instance of any VS I get a popup of "Out of memory".  Even when I stop all of the VS’s running and manually kill the MSBuild and conhost processes it still does not allow VS to start again unless I logout and login again.

我有一个即将到期的项目,我需要解决这个问题。

I have a project that is due soon and I need to get this issue resolved.

Pat Jones

Pat Jones

推荐答案

Pat E.Jones,

Hi Pat E.Jones,

感谢您在此发帖。

t 当你在
不同项目的运行时只有一个VS时,他的问题会发生吗?如果是,请尝试删除项目文件夹中的.suo文件,然后重新打开项目,再次检查。

Will this problem happen when you have only one VS at run time with different projects? If yes, please try to delete .suo file in your project folder, and then re-open your project, check it again.

或者您可以创建一个新的空白解决方案,然后构建它多次,检查MSUBild * 32.exe和conhost#32.exe是否正确清理。

Or you could create a new blank solution, then build it multiple times , check if MSBuild*32.exe and conhost#32.exe are properly cleaning up.

此外,请重置VS设置((请点击工具 - >导入和导出设置 - >重置所有设置),然后以安全模式运行VS,检查结果(打开管理CMD窗口并导航到C:\Program Files(x86)\ MicrosoftMicrosoft Visual
Studio 14.0 \ Common7 \IDE并运行以下命令:     

In addition, please reset VS settings ((Please click Tools->Import and Export Settings->Reset All Settings), and then run your VS in safe mode, check the result(open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE and run these commands:     

Devenv.exe / safemode。

Devenv.exe /safemode.

如果它在安全模式下不起作用,请尝试删除或重命名以下文件夹:

C:\ Users \<您的用户名> \ AppData \本地\ Microsoft /\\ VisualStudio \ 2014.0¥b $ b C:\ Users \<您的用户名> \ AppData \漫画\\ Microsoft /\\ VisualStudio \\\ 2014.0

If it doesn’t work in safe mode, please have a try with delete or rename the following folders:
C:\Users\<your users name>\AppData\Local\Microsoft\VisualStudio\14.0
C:\Users\<your users name>\AppData\Roaming\Microsoft\VisualStudio\14.0

此外,在与并行版本混合的解决方案之间进行某种切换会导致某种类型的损坏/错误产生多个MSBuild,所以请尝试将您的构建选项更改为仅1个并行构建。 (工具 - >选项 - >项目
和解决方案 - >构建和运行)。

Besides, some kind of switching between the solutions mixed with the parallel builds caused some kind of corruption/error which spawned multiple of MSBuilds, so please try to change your build options to be only 1 parallel build. (Tools->Options->Projects and Solution->Build and Run).

希望这会有所帮助。


这篇关于Visual Studio Professional 2015(更新3)构建过程停止工作,错误消息显示“内存不足”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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