Visual Studio Build Very Slow

Maz picture Maz · Aug 23, 2012 · Viewed 87.9k times · Source

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 and with reasonably good CPU utilisation. After "some time" (ie using the computer for "stuff"), a subsequent build might run very, very slowly and with very low CPU utilisation. The only fix I have found seems to be a reboot, then the cycle starts all over again. This happens on both WPF and non-WPF projects, though it's 10 times worse with WPF.

This has happened to me on different machines, even working for different organisations, so I think it's a Visual Studio thing, not an environment thing. I've tried the usual (Google, turn off AV, Intellisense, Resharper etc, and currently looking forward to getting the SSD I have on order).

My current machine spec is 2.7gig quad core, 4GB RAM, XP (haven't got Win7 at work yet), 250Gb hdd etc

Anyone got any ideas what this could be and how to fix it?

Thanks in advance!

Answer

Sam picture Sam · Mar 11, 2013

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.