Sunday, November 28, 2010

Slow connection when connecting to Team Foundation Server from Visual Studio 2010

At a client we were testing our newest line of development machines. After installing Visual Studio 2010 we noticed that the performance was VERY slow when connecting to Team Foundation Server (2010). Performing a get latest of a large solution took several hours(!).

Some investigation showed that it does not appear to be a TFS issue per se but rather something lower in the .NET Framework stack, having to do with automatic proxy discovery through the WPAD protocol.

You can work around the issue by turning off proxy autodiscovery on a per-application basis by using a .exe.config setting.

The .exe.config for Visual Studio is %VSINSTALLDIR%\Common7\IDE\devenv.exe.config and it already contains a section in the .exe.config for System.Net. After adding the defaultProxy element, that section would look like this:

   1:  <system.net>
   2:     <defaultProxy enabled="false" />
   3:     <settings>
   4:        <ipv6 enabled="true"/>
   5:     </settings>
   6:  </system.net>


Issue solved!

33 comments:

Anonymous said...

Thank you! This solved the issue on three developer machines at our business!

Anonymous said...

Excellent tip!

Nacho said...

Really gratefull!!!

Isseu solved!!!!

Anonymous said...

Nice! Thank you

Brian D. said...

This was a doozy. You are my hero today!

Anonymous said...

I love you for this blog post! Helped me alot.

Anonymous said...

Perfect - Wonderful tips

JP said...

Excellent !
Thanks for the tip !

Anonymous said...

So glad I found your workaround, I was starting to get blocked.
Thank you for sharing this with the community.
Truly,
Stephane

Gishu said...

+1. Great work!

Btw how did you figure out the fix ? I just lost about 4 hours of my life on this.

Anonymous said...

Awesome! It was taking me 20 to 30 seconds to check files in and out of TFS before I found your post. Thanks a lot!

Dave said...

YES!!! This was exactly what I was looking for!!! You just saved me a ton of time.... Thanks

Mena Effat said...

Thank you, that really did the trick

Corneliu Serediuc said...

You are my hero!
Thank you for this excellent tip!

Tony Bromirski said...

Thanks for saving my hair!!

Mon blog said...

Works great!! Thank you!

Anonymous said...

Great,That Solved the issue

Anonymous said...

Wow. Very nice!! Thanks!

Anonymous said...

Thanks a lot. It worked.

Anonymous said...

I reckon this helped me too. Thanks very much :)

Ian Prest said...

Thanks! Help a lot at our workplace too. (But we just added it to machine.config so we don't have to modify all the .exe.configs for each of our internal TFS tools.)

Adam said...

I've never seen TFS run so fast!

Thanks so much!

Anonymous said...

Lovely ol' job.

Cheers for sharing!

Anonymous said...

TFS was taking several minutes just to connect, and a minute or so just to expand a folder. This little jewel fixed that. Thanks for the post!

Rainer Eli Rodriguez Palacios said...

Thank you very much .. this is exelent

Robert Scott-Norton said...

Been putting up with slow connections for a couple of weeks. Friendly developer found this blog and sorted my machine out for me. Magic.

Anonymous said...

wow nice, thank you

Neelu said...

This worked for me too!! Many thanks :)

Anonymous said...

Many thanks... This solved the issue on one of our development machines!

Anonymous said...

thank you so much ! guys like you are really amazingggg

Anonymous said...

thanks so much ! 100% correct

Farid said...

problem solved! thx

Anonymous said...

Still works today, and solved the same problem for me in Visual Studio 2015 - even though this value is set in the Registry, setting in the config file fixed it. Thanks again. Your information is still saving folks time today!