views:

1940

answers:

5

Hi

Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work!

Is it possible to switch TFS into an offline mode in the event of such an issue?

Martin

+8  A: 

See this reference for information on how to bind/unbind your solution or project from source control.

Quoting from the reference:

To disconnect a solution or project from source control

  1. In Visual Studio, open Solution Explorer and select the item(s) to disconnect.

  2. On the File menu, click Source Control, then Change Source Control.

  3. In the Change Source Control dialog box, click Disconnect.

  4. Click OK.

tvanfosson
Thanks. The painful part was waiting for the connection to time out to let me into VS!
MPritch
The benefit is that it remains "bound", but disconnected so you just have to reconnect rather than rebind everything. It automatically checks for any modifications that occurred while disconnected, and performs the appropriate actions (check out, etc.)
GalacticCowboy
@MPritch - you can speeds this up by adding an entry to your hosts file, pointing your TFS server to 127.0.0.1. This causes it to fail fast, so you can then use tvanfosson's suggestion. Don't forget to remove the hosts entry though :)
Rob Levine
A: 

What do you do when the "Disconnect" button is greyed out in the "Change Source Control" dialog...?

Per Lundberg
Richard: Thanks, but this is actually with VS2008... :-(I know I can close and reopen the solution but it would be nice if there was a better way. Please, share any ideas you might have.
Per Lundberg
A: 

Depending on which tool windows you have open, VS may or may not try to hit the team server automatically when it starts up.

For best results try this:

  1. Close all instances of visual studio
  2. Open an empty visual studio (no project/solution)
  3. See which windows are opened by default, if source control explorer or team explorer or any other windows that use team are opened (and activated) by default, close them or switch them to a background tab.
  4. Close visual studio

You should notice now that you can start visual studio without it trying to hit the TFS server.

I know its just an aside to your problem, but I hope you find this helpful!

TJB
+2  A: 

plundberg: The "disconnect" button is only available for the TFS provider starting in VS 2008. Even then, I'm not sure if it's officially supported. The recommended way to use the Go Offline feature is to [re]open the solution.

Martin Pritchard: if you get stuck mid-operation, you can force VS to timeout by pulling the network plug (literally) or running ipconfig /release.

Once you're marked offline, here's a step by step guide to working in that mode: http://teamfoundation.blogspot.com/2007/12/offline-and-back-again-in-vs2008.html

More detailed info on tweaking the behind-the-scenes behavior: http://blogs.msdn.com/benryan/archive/2007/12/12/when-and-how-does-my-solution-go-offline.aspx http://blogs.msdn.com/benryan/archive/2007/12/12/how-to-make-tfs-offline-strictly-solution-based.aspx

Richard Berg
+1'd for the ideas. Luckily I'm out of TFS hell now, and back using good old Subversion :)
MPritch
Looks like the only way to force off-line mode is by unplugging your network cable. There is no "work off-line" button.
Remko Jansen
A: 

I just wanted to include a link to a resolution to an issue I was having with VS2008 and TFS08.

I accidently opened my solution without being connected to my network and was not able to get it "back the way it was" and had to rebind every time I openned.

I found the solution here; http://www.fkollmann.de/v2/post/Visual-Studio-2008-refuses-to-bind-to-TFS-or-to-open-solution-source-controlled.aspx

Basically, you need to open the "Connect to Team Foundation Server" and then "Servers..." once there, Delete/Remove your server and re-add it. This fixed my issue.

JonnyBasic