I’ve had a weird problem on my development station for some time now. Every time I ended a debugging session of a C# project, visual studio froze for about 10 seconds. It also happened if I changed project settings, but I never had any problems with C++ projects.
My development station at work is a DELL Precision 670 running windows 2003 server. It has 2 dual core Xeon cpus, 4 GB of memory, an nvidia 8500 graphics board and a WD sata hard disk. It is fast, so any lags or slowness would not be hardware related.
Now, if I was Mark Russinovich, I would use my extensive debugging experience to track down the underlying problem. But I am not, and since the majority of my work is C++, and I don’t start and stop debugging sessions frequently, I could not be bothered to spend a lot of time to hunt down the problem. Installing VS2008 SP1 didn’t fix the problem so I suspected it had something to do with my local configuration.
Today I finally figured it out: This was caused by the windows 2003 ‘Enhanced Internet Security configuration’. Removing that from my system solved the problem and VS2008 was finally as snappy as I’d expect.
I don’t know exactly what the problem was, but C# projects do much more with XML and html than C++ projects. I think it is probable that C# projects do something that triggers the security configuration, which then doesn’t respond because there is no user to acknowledge a prompt. 10 seconds looks like a reasonable connection timeout, so it is at least plausible.
I still would like to figure out the real cause of the problem, but at least my problem is solved. If you experience anything similar on Windows 2003, it might be worth trying this.
In my case I simply removed the entire Enhanced Internet Security configuration from my system. It is not connected to the internet, so the risk is pretty much nonexistent.