My Visual Studio seems to be freezing/lagging when I open a existing project. I have added NHibernate framework into my code and it seems to lag my computer (at least that\'s wh
My local files somehow became corrupted for one project, fortunately I didn't have any pending changes so rather than run chkdsk I just deleted the folder and checked out the solution from source control again.
You can see exactly what VS is doing at any given moment, if you attach a debugger to the devenv.exe process and hit Break when it hangs. Then load the symbols from Microsoft Symbols server and show the call stack for the VS main thread.
I wrote a very detailed article about how to debug crashes and hangs here: http://blogs.msdn.com/kirillosenkov/archive/2008/12/07/how-to-debug-crashes-and-hangs.aspx
From the call stack it should be obvious what is causing the delay.
Uninstall any MS Enterprise Framework addin's you may have.
Delete the VS temp directory (and the Windows one).
Do you use TFS? Perhaps the server is a bit sleepy, that will make it freeze for a few minutes, but is ok afterwards.
For me, a chkdsk /F /R
(which will prompt you to restart) and about 30 minutes of company time fixed this issue.
I think a few improperly closed instances of Visual Studio may have attributed to the issue.