Visual Studio 2015 is extremely slow

C#Visual Studio-2015

C# Problem Overview


I have installed Visual Studio 2015 Professional Edition, and my computer specs are Intel i7-3770 CPU 3.40 GHz, 8 GB RAM, and Windows 7 Enterprise 64-bit.

I want to upgrade my project to .NET 4.6 which is written in Visual studio 2005 .NET 2.0, but I have a serious problem about speed. After I open my project (huge project) in Visual Studio 2015 it is going crazy. Building, debugging, opening menus are too slow. Sometimes I got "not responding" message. Is it about Windows 7 or can you give me any advice about my speed problem?

C# Solutions


Solution 1 - C#

You can try to apply the following steps:

  1. Go to menu ToolsOptionsSource Control and set Current source control … to None

  2. Go to menu ToolsOptionsEnvironment (or Accounts)Synchronized Settings and remove this option by unchecking the checkbox.

  3. Clean the contents in the following cache folders (do not delete these folders, instead delete their contents only) and restart Visual Studio:

  • Clean the content in WebSiteCache folder (can be found in
    C:\Users%USERNAME%\AppData\Local\Microsoft\WebSiteCache)

  • Clean the content in Temporary ASP.NET Files folder (can be found in
    C:\Users%USERNAME%\AppData\Local\Temp\Temporary ASP.NET Files)

Note: If you have Hardware Acceleration enabled or if you use the default Visual experience settings in Microsoft Visual Studio 2015 or Visual Studio 2013, you might experience intermittent performance issues, product crashes, or rendering issues. In order to work around these issues, go to menu ToolsOptionsEnvironmentGeneral and apply the following settings:

Enter image description here

For more information, visit You experience performance issues, product crashes, or rendering issues in Visual Studio 2015 and Visual Studio 2013.

If the problem is related to debugging, try the workaround on Visual Studio debugging/loading very slow.

I hope this helps...

Solution 2 - C#

This site contains some useful tips on how to improve the Visual Studio performance, disabling features for large solutions. For example:

  1. Go to Tools -> Options -> Text Editor -> C# -> Advanced and uncheck Enable full solution analysis

  2. Go to Tools -> Options -> XAML Designer -> General and uncheck Enable XAML Designer (requires restart of Visual Studio)

  3. Go to Tools -> Options -> Text Editor -> All Languages and uncheck Enable CodeLens

  4. Go to Tools -> Options -> Debugging -> General and disable Enable Diagnostic Tools while debugging

Solution 3 - C#

I have a large project and have experienced these kinds of slow downs too. I've improved the performance to an acceptable level by changing the scope of the Error List window to Current Document.

I also get improvements by changing from Build + IntelliSense to Build Only. But because I find the IntelliSense useful, I compromised to keeping Build + IntelliSense and scoping to Current Document.

Visual Studio 2015 Error List Window

Solution 4 - C#

I have found that removing the ".vs" folder from your solution folder greatly increases editor speed if it becomes slow over time. It is a hidden folder in the root directory of your solution. I would recommend saving a backup of it just in case you need to revert. As far as I know, it holds user specific settings for the solution such as the .suo file as detailed here. You can try just removing the .suo file too. These folders/files will be regenerated by VS the next time you open and close that solution.

Solution 5 - C#

The Windows Defender Antimalware can cause Visual Studio to lag. As mentioned by Nostradamus in this answer:

> Go to Update & Security -> Settings -> Windows Defender. Open the Defender and in the Settings selection, choose Exclusions and add the "devenv.exe' process.

Another thing I did was update ReSharper and every addon to the latest update.

I also noted that several processes called Microsoft Compatibility Telemetry, CompatTelRunner.exe was using a lot of CPU when I used Visual Studio. I disabled "Feedback and diagnostics" by following this guide.

It worked for me!

Solution 6 - C#

Is it possible that you were trying to do different operations on solution at the same time? In my situation, the problem appeared because I was trying to open solution, while there was a process from TFS, which was trying to get latest version. Some kind of lock happened. Safest way I thought of was to restart the system, delete .suo file and it worked for me.

What else: check if your visual studio version is 64bit on 64bit system, I have uninstalled some team foundation power tools and it screwed with my VS, it produced the same problems

Solution 7 - C#

Make sure you're not working on a solution that's on a network drive.

Seems like such an obvious thing, but I missed it, and VS gives you precisely no hints as to the problem, it's just lots of "Not Responding...".

Solution 8 - C#

For me the culprit was Resharper cache, simply clear Resharper cache and it works fine

Solution 9 - C#

I suggest the quickest and easier performance enhancement (for C#) is to replace VS 2015/2017 with VS2013.

C# is largely unchanged between versions. It just takes twice as long to use 2015/2017 and I am sure I am not the only one to waste time using later (better)compilers only to have to revert.

I do not think it is unreasonable to expect to use a compiler straight out of the box. You can with 2013.

Microsoft MUST ensure VS2019 is at least as fast as 2013 (for C#)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVins4nityView Question on Stackoverflow
Solution 1 - C#Murat YıldızView Answer on Stackoverflow
Solution 2 - C#Ricardo FontanaView Answer on Stackoverflow
Solution 3 - C#Ɖiamond ǤeezeƦView Answer on Stackoverflow
Solution 4 - C#big_waterView Answer on Stackoverflow
Solution 5 - C#OgglasView Answer on Stackoverflow
Solution 6 - C#DiSaSteRView Answer on Stackoverflow
Solution 7 - C#Ben PowerView Answer on Stackoverflow
Solution 8 - C#Dhanuka777View Answer on Stackoverflow
Solution 9 - C#user2840301View Answer on Stackoverflow