VS2015 Update 2 message: "Low memory detected. Full solution analysis disabled for this solution."
Solution 1:
After a very brief analysis it seems that issue can be related to CodeAnalysis implementation which is enabled by default and I could not find any configuration file option which can disable it.
Here are reference search results.
I was however able to successfully disable CodeAnalysis VS plugin for the time being and it seems it made a difference in how smoothly VS runs.
The only change was to rename CodeAnalysis extension plugin folder from:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis
to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis_disabled
This obviously will degrade VisualStudio feature set and possibly cause some side effects but since I'm using ReSharper's own alanylsis features, the VS CodeAnalysis was just excessive.
Update:
It looks like Microsoft.VisualStudio.CodeAnalysis.VCPlugin.dll is also added to GAC and protected from deletion by gacutil. To forcibly remove it from GAC following steps are required:
- Delete the following registry key but save it first just in case:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Assemblies\Global] "Microsoft.VisualStudio.CodeAnalysis,version=\"14.0.0.0\",publicKeyToken=\"b03f5f7f11d50a3a\",processorArchitecture=\"MSIL\",fileVersion=\"14.0.23107.0\",culture=\"neutral\""=hex(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
- Uninstall the assembly from GAC
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\gacutil.exe" /u "Microsoft.VisualStudio.CodeAnalysis, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /f
It migt be also advised to move CodeAnalysis_disabled folder to another location as I cannot tell how VS MEF loader is implemented and where will it search for plugins.
Solution 2:
A workaround for this issue is to disable Full solution analysis by going to Tools -> Options -> Text Editor -> C#(or Basic) -> Advanced -> Uncheck "Enable full solution analysis".
This appears to be a bug that the Rosyln team is working on https://github.com/dotnet/roslyn/issues/10365
Solution 3:
I read some articles describing this problem as exceeding of virtual address space because some internal memory structure (List maybe) exceeds 2GB. 2GB is the default virtual address space for 32 bit processes like VS 2015. But you can adjust it to maximum of 3GB.
The solution I found is from here :
Start▸All Programs▸Accessories▸right-click on Command Prompt▸Run as administrator
Run the following command:
bcdedit /set IncreaseUserVa 3072
Restart the computer.
This is not 100% solution because you can eventually run out of virtual address space even with 3GB of RAM for a process. After adjusting this switch VS stopped complaining about memory.
Solution 4:
Few weeks now with update 3 available and nobody answering...
"Visual Studio Update 3" fix that issue and solve many others. A MUST !!!
I recommend to read this before installing Update 3: Visual Studio 2015 Update 3 and .NET Core 1.0 Available Now from John Montgomery.
Direct Download link: Visual Studio Update 3
Solution 5:
My answer is to Close and Open Visual Studio.
I have "Enable full solution analysis" unchecked and I am still getting the Visual Studio message "Low memory detected. Full solution analysis disabled for this solution." Visual Studio 2015 version is 14 Update 2. I find that I have to close VS.
VS becomes unable to open TFS tasks and I cannot check in code unless I close and reopen VS. Thankfully I have a new solid state hard drive so the VS close/open does not make me wait terribly long like it did before. But still a disappointing hassle.