VS2015 Update 2 message: "Low memory detected. Full solution analysis disabled for this solution."

时间:2016-04-04 17:58:37

标签: memory visual-studio-2015

I just updated Visual Studio 2015 with Update 2.

Now, after few hours of working fine, I received: "Low memory detected. Full solution analysis disabled for this solution." that appears on the top of my editor dock panel of VS2015.

I saw that a bug had been reported at Microsoft Connect.

Notes:

  • I'm using Resharper.
  • My solution is pretty big, ~32 projects in it.

If anybody has a workaround or a hint on what to do to solve this, please let me know.

Update: I have pretty much the same feelings as Anders Forsgren (first comment). That's sounds to me a good summary of the situation.

Update 2 (2016-04-20) I recently (3 days ago) made a big clean up of my Framework.Net installed packages (from "Programs and features") where I removed about 20-30 packages. Some were in Russian. I also re-installed Visual Studio and ReSharper. All of that seems to have add some stability to my environment (less or no more freezes -> time will tell). Also, there is a new (2016-04-19) .NET Framework Repair Tool Version that came out recently. Perhaps it could help to fix some of our problems, if any related?

Update 3 After some tests and read some peoples text. It seems that it is not related to .Net framework itself or Resharper. It seems to be related to VS2015 itself, probably Roslyn. I didn't success to remove Roslyn/CodeAnalysis from VS2015, it appears to be an essential part. It sounds like we will have to wait for a Microsoft fix to have a stable environment.

Update 4 (2016-04-26) See John Atwood answer. Lots of information. I just started to test its answer. Update 3 should solve this issue (when available ???).

Update 5 (2016-04-26 + 6 hours) After 1 restart done by VS itself, one incredible slowness and also one message "Low memory...", I could confirm that disabling Full Solution analysis does not fix the problem, at least on my machine. I currently don't know any fix/workaround that works on my machine.

Update 6 (2016-06-15) Mladen Mihajlovic woke me up. I just realized that I forgot to tell about the availability of VS2015 Update 3 RC (please note that I think it is the second release: Update 3 RC2). It is available since june 7 at MSDN, RC1 = 14.0.25401.00 while RC2 = 14.0.25402.00. It sounds to be a lot more stable (I highly recommend it).

7 个答案:

答案 0 :(得分:3)

经过非常简短的分析后,问题似乎与CodeAnalysis实现有关,默认情况下启用了CodeAnalysis,我找不到任何可以禁用它的配置文件选项。

以下是reference search results

然而我暂时能够成功禁用CodeAnalysis VS插件,看起来它对VS运行的顺畅程度有所不同。

唯一的变化是从以下位置重命名CodeAnalysis扩展插件文件夹:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis_disabled

这显然会降低VisualStudio功能集并可能导致一些副作用,但由于我使用ReSharper自己的alanylsis功能,因此VS CodeAnalysis过度。

<强>更新

看起来Microsoft.VisualStudio.CodeAnalysis.VCPlugin.dll也被添加到GAC并且被gacutil保护不被删除。要在以下步骤中强行将其从GAC中删除:

  1. 删除以下注册表项,但先保存它以防万一:
  2.   

    Windows注册表编辑器版本5.00

         

    [HKEY_LOCAL_MACHINE \ SOFTWARE \类\安装\装配\全球]       &#34; Microsoft.VisualStudio.CodeAnalysis,版本= \&#34; 14.0.0.0 \&#34;公钥= \&#34; b03f5f7f11d50a3a \&#34;,ProcessorArchitecture用于= \&#34; MSIL \& #34;,FILEVERSION = \&#34; 14.0.23107.0 \&#34;,培养= \&#34;中性\&#34;&#34; =十六进制(7):图6A,\         00,5f,00,65,00,7e,00,5a,00,61,00,47,00,71,00,2a,00,3f,00,6a,00,61,00,31,00, \         30,00,6e,00,66,00,70,00,4e,00,2d,00,44,00,54,00,65,00,73,00,74,00,54,00,6f, \         00,6f,00,6c,00,73,00,5f,00,65,00,6e,00,75,00,3e,00,39,00,42,00,21,00,4e,00, \         63,00,6a,00,24,00,58,00,70,00,45,00,42,00,75,00,6a,00,21,00,56,00,3d,00,2d, \         00,31,00,51,00,32,00,00,00,68,00,6a,00,4f,00,46,00,70,00,48,00,2d,00,24,00, \         如图4B所示,00,34,00,69,00,4f,00,68,00,33,00,72,00,60,00,65,00,62,00,28,00,36,00,43, \         00,6f,00,64,00,65,00,5f,00,41,00,6e,00,61,00,6c,00,79,00,73,00,69,00,73,00, \         图5f,00,54,00,6f,00,6f,00,6c,00,73,00,5f,00,31,00,31,00,39,00,38,00,37,00,5f, \         00,78,00,38,00,36,00,5f,00,65,00,6e,00,75,00,3e,00,39,00,42,00,21,00,4e,00, \         63,00,6a,00,24,00,58,00,70,00,45,00,42,00,75,00,6a,00,21,00,56,00,3d,00,2d, \         00,31,00,51,00,32,00,00,00,00,00

    1. 从GAC卸载程序集
    2.   

      &#34; C:\ Program Files(x86)\ Microsoft SDKs \ Windows \ v10.0A \ bin \ NETFX 4.6 Tools \ x64 \ gacutil.exe&#34; / u&#34; Microsoft.VisualStudio.CodeAnalysis,Version = 14.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a,processorArchitecture = MSIL&#34; / F

      还建议migt将CodeAnalysis_disabled文件夹移动到另一个位置,因为我无法告诉VS MEF加载器是如何实现的,以及它将在何处搜索插件。

答案 1 :(得分:3)

此问题的解决方法是通过转到工具 - &gt;来禁用完整解决方案分析。选项 - &gt;文字编辑器 - &gt; C#(或Basic) - &gt;高级 - &gt;取消选中&#34;启用完整的解决方案分析&#34;。

这似乎是Rosyln团队正在处理https://github.com/dotnet/roslyn/issues/10365

的错误

答案 2 :(得分:3)

我读了一些描述这个问题的文章超过了虚拟地址空间,因为一些内部内存结构(列表可能)超过了2GB。 2GB是32位进程(如VS 2015)的默认虚拟地址空间。但you can adjust it最多为3GB。

我找到的解决方案来自here

Start▸All Programs▸Accessories▸right-click on Command Prompt▸Run as administrator

Run the following command:

bcdedit /set IncreaseUserVa 3072

Restart the computer.

这不是100%的解决方案,因为即使有3GB的RAM用于进程,最终也可能耗尽虚拟地址空间。调整此开关后,VS停止抱怨内存。

答案 3 :(得分:2)

我的回答是关闭并打开Visual Studio。

我已经&#34;启用完整的解决方案分析&#34;未经检查,我仍然收到Visual Studio消息&#34;检测到低内存。针对此解决方案禁用完整解决方案分析。&#34; Visual Studio 2015版本是14 Update 2.我发现我必须关闭VS.

VS无法打开TFS任务,除非我关闭并重新打开VS,否则我无法检入代码。值得庆幸的是,我有一个新的固态硬盘,所以VS关闭/打开不会让我像以前一样等待很长时间。但仍然是一个令人失望的麻烦。

答案 4 :(得分:2)

几周以来,更新3可用,没有人回答...

&#34; Visual Studio Update 3&#34;解决这个问题并解决许多其他问题。必须!!!

我建议在安装第3版之前阅读此内容:Visual Studio 2015 Update 3 and .NET Core 1.0 Available Now来自John Montgomery。

直接下载链接:Visual Studio Update 3

答案 5 :(得分:0)

我一直在忍受这个问题。在使用TypeScript文件时,我会看到内存使用率稳步攀升,最终导致崩溃。如果这可能是您的情况,请检查您的项目中是否有rxjs。如果版本是5.0.0-beta.2,则升级到5.0.0-beta.3(或更高版本)以修复它。

更多详情:https://github.com/Microsoft/TypeScript/issues/7344#issuecomment-198392320

答案 6 :(得分:0)

我希望我有一个神奇的子弹。但这里有什么帮助我,但现在总能解决问题。 VS2015更新2. Resharper 2016.1.1。所有项目都是vNEXT。

  1. 在Resharper中 - &gt;选项 - &gt;代码检查 - &gt;设置。添加尽可能多的wwwroot文件夹。我还添加了每个文件夹unter wwwroot,因为它似乎没有级联。在文件掩码中,添加任何框架* .js或* .css(即* .min.js,* jquery.js,* angular.js,* .min.css)。这一步帮助减少了当我使用Gulp,Grunt构建js / css进行发布时resharper所做的“加载源文件”。

  2. 这不太理想,但是当我编写代码并且不打算进行测试时,我将卸载所有我不使用的项目,通常是在测试中。这似乎减少了resharper / vs使用的'Managed Memory'。

  3. 最后,有点烦人的是,我从不在VS解决方案资源管理器中查看bower_components下的文件。我发现直接进入文件夹并使用像VSCODE这样的JS / JSON查看节省了我的时间和挫折感。这让我相信尽管node_modules和bower_components被“忽略”,但它们实际上并没有被忽略,或者它与项目目录中的大量文件有关。

  4. 我等待100%的解决方案,但我希望这些有帮助。