I have a centralized file server where I store pretty much all of my data.
When I got my file server I moved all my data to it including my
Visual Studio projects. This was about a year ago.
I figured I could easily map a network drive and load up the projects
and work on them from there. However, it didn't work as smoothly as I would
have liked it to. For what ever reason about 1/3rd of the time when I save a
file (that is on my network drive) Visual Studio hangs anywhere from
10-45 seconds. As you could imagine this gets very annoying very quickly.
Since then I gave up the idea of running my projects from my network drive.
Today I was updating an old project that was on my network drive and I
figured it should be rather quick so I would try to run the project from the
network drive. That was a mistake! Almost every time I saved or built my project
I got the 10-45 second hang of Visual Studio. It was really quite frustrating.
I figured that someone else out there must have had the same problem before
so I did my usually google research but I didn't come up with anything clean
cut. I did however run across a newsgroup posting
about a similar problem with Office and Visual Studio. That post pointed to
MSDN's Configuring
Opportunistic Locking in Windows knowledgebase article. I was so frustrated
that I figured hey why not I will give it a try.
I set the registry keys on my file server and I figured the change would
take place immediately because usually if it requires a restart the
knowledgebase article would say that but this article didn't. After testing it I
still had the problem, Grrrrr... I didn't really want to reboot my entire server
so instead I just quickly restarted my Server service, hoping that this would
fix the problem. Much to my delight it did fix the problem ;)
So anyways the moral of the story is if you want to run Visual Studio
projects from a network drive but are having problems with Visual Studio hanging
while saving files then you might want to consider setting the registry keys
from the above knowledgebase article and remember to restart the server (at
least the Server service).
I hope this saves someone else the pain of dealing with this
problem.