62

Is there a way to set "work offline" in TFS without having to try opening a solution, waiting for it to time out, and then having Visual Studio work out that it has failed?

It seems a touch ridiculous that I can't just tick a box to tell it myself, seeing as I'm probably the one most qualified to know when I'm not in the office!

tags2k
  • 70,860
  • 30
  • 74
  • 105
  • 6
    I agree, a lot of TFS has the smell of Visual Source Safe left on it. – Chris S Oct 25 '10 at 09:29
  • None of these answers really catches up with the question. Yes, you can let Visual Studio **detect** that it's offline, but what if you're not satisfied with this? What if you don't want it to try to connect to the TFS server 10 times before the solution finally is opened? Please, if anyone knows a solution (hacking the registry is of course one thing...), share it. – Per Lundberg Feb 03 '11 at 19:39
  • @Per: See my answer, I think it has the info you want. – Richard Berg Feb 03 '11 at 19:39
  • Additional solutions/references at http://stackoverflow.com/questions/934875/how-to-work-offline-with-tfs – Maslow Feb 03 '11 at 19:39

7 Answers7

28

This extension should solve your problem (for VS 2010):

http://visualstudiogallery.msdn.microsoft.com/425f09d8-d070-4ab1-84c1-68fa326190f4?SRC=Home

  • 1
    Here's the 2012 version: http://visualstudiogallery.msdn.microsoft.com/6e54271c-2c4e-4911-a1b4-a65a588ae138 – lambinator May 09 '13 at 19:41
10

Here's the solution for VS 2008 with TFS

  1. Navigate to Visual Studio Menu ---- File > Source Control > Change Source Control > Click on Solution/Project > Check/uncheck the project checkboxes > Click 'Unbind' button at the top.

This makes your complete solution or the selected project(s) in the solution Offline from the TFS.

  1. When you want to Go Online, follow the same steps and click the button 'Bind'
Balaji Birajdar
  • 2,259
  • 1
  • 21
  • 26
8

Ben Ryan has the regkeys you seek on his blog:

Most of these controls are also built into the latest Power Tools:

C:\Users\Richard> tfpt tweakui /?
tfpt tweakui - Enhance how client connects to Team Foundation Server

Allows configuration of how and when the client connects to a 
Team Foundation Server.  This includes client certificates, auto
reconnect, offline, compression, maximum connections, timeouts, 
and bypassing the proxy.
Richard Berg
  • 20,225
  • 2
  • 63
  • 86
3

when I have to work offline I just unplug my ethernet cable and start TFS 2008. It starts me in offline mode. Then plug back in, right-click 'work online' in solution explorer, and TFS will ask you to check in your offline changes.

T. Webster
  • 8,411
  • 5
  • 62
  • 90
  • Thanks...how to get back online was actually what I was looking for. Imagine that...it's buried in a context-menu and not visible on any TFS menu, task pane, or menu bar...splendid. Thanks though! – Carl G Nov 14 '12 at 15:04
2

add a host entry 127.0.0.1 tfs.foo.com

john
  • 21
  • 1
1

Team Foundation Server 2008 does support working offline.

This video demonstrates how to use this feature.

Ian Nelson
  • 51,299
  • 20
  • 72
  • 100
0

If TFS is down, you might have trouble going into offline mode. If you close and reopen your solution, a nice little dialog will appear asking you if you want to Go Offline.

Alternatively if you don't want to close/reopen the solution, you can install the TFS Go-Offline plugin, then click:

TEAM -> Go Offline
demoncodemonkey
  • 11,027
  • 10
  • 53
  • 95