How to work offline with TFS

Visual StudioTfs

Visual Studio Problem Overview


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?

Visual Studio Solutions


Solution 1 - Visual Studio

See this reference for information on how to bind/unbind your solution or project from source control. NOTE: this doesn't apply if you are using GIT and may not apply to versions later than VS2008.

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.

Solution 2 - Visual Studio

The 'Go Offline' extension adds a button to the Source Control menu.

https://visualstudiogallery.msdn.microsoft.com/6e54271c-2c4e-4911-a1b4-a65a588ae138

Solution 3 - Visual Studio

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

Solution 4 - Visual Studio

There are couple of little visual studio extensions for this purpose:

  1. For VS2010 & TFS 2010, try this
  2. For VS2012 & TFS 2010, use this

In case of TFS 2012, looks like there is no need for 'Go offline' extensions. I read something about a new feature called local workspace for the similar purpose.

Alternatively I had good success with Git-TF. All the goodness of git and when you are ready, you can push it to TFS.

Solution 5 - Visual Studio

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!

Solution 6 - Visual Studio

If you have a solution open, and 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, (as suggested by Bernie) you can install the TFS Go-Offline plugin, then click:

TEAM -> Go Offline

Solution 7 - Visual Studio

Simply, change the root folder name for your solution in your local machine, it will disconnect automatically.

Solution 8 - Visual Studio

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.

Solution 9 - Visual Studio

If the code has already been checked out by the user that if offline and they have the latest version on their local hd, then they just need to browse to the solution location and open the solution by double clicking sln file. The solution will open in disconnected mode.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMPritchardView Question on Stackoverflow
Solution 1 - Visual StudiotvanfossonView Answer on Stackoverflow
Solution 2 - Visual StudioBernie TschirrenView Answer on Stackoverflow
Solution 3 - Visual StudioRichard BergView Answer on Stackoverflow
Solution 4 - Visual StudiorpattabiView Answer on Stackoverflow
Solution 5 - Visual StudioTJBView Answer on Stackoverflow
Solution 6 - Visual StudiodemoncodemonkeyView Answer on Stackoverflow
Solution 7 - Visual StudioMohamed Al-HosaryView Answer on Stackoverflow
Solution 8 - Visual StudioJonnyBasicView Answer on Stackoverflow
Solution 9 - Visual Studiouser1703892View Answer on Stackoverflow