This applies to both 2008 and 2010 versions (and probably earlier ones too). Also to both C++ and C# projects.
An initial build (after reboot) runs at normal speed
As a quick check, run a scan to make sure you don’t have anything currently infecting your system, and then go to Windows Defender Security Center-> Virus & threat Protection -> Disable Real-time protection:
real-time-protection
Rebuild your solution in Visual Studio, noting the total time it takes and observing in Task Manager to see if the Antimalware Service Executable appears to be consuming significant processor time. Assuming your build is faster and your CPU less busy, congratulations, you’ve identified one cause of your performance problems. The next step is to responsibly tell Windows Defender to leave Visual Studio alone without turning it off completely.
Try this as it worked for me:
Press Windows+R or open run from Start.
Now type %temp%
and delete everything from there...
Now open Run again and type prefetch
and delete everything from there also.
Now open VS and see the performance.
About how long is "Some time"? (eg, Hours? Days?)
It could be as simple as you've run out of RAM.. Ctrl-Shift-Esc will load the Process Monitor where you can see your memory utilization, and kill hogs. Once it's run low, your linkers will slow down trying to swap memory to disk (and Windows doesn't typically report swap overhead unless you turn on System utilization). Depending on the size of your project, Linking can use HUGE amounts of memory making tables.
I had the same issue. Deleting the hidden .vs
folder in the solution directory solved the problem.
If there are many project in a single solution, try building the changed one only rather than building the whole solution. Namely, Alt+B+U rather than Alt+B+B.
Take a Backup of Files and Delete everything in the folder in this folder.
C:\Users\{username}\AppData\Local\Microsoft\WebsiteCache
Restart Visual Studio and Check the performance.
Hope this helps! Thanks