Quantcast
Viewing all articles
Browse latest Browse all 5

Tip of the day: Getting Visual Studio with TFS to work offline

Earlier to day our TFS server went down. Visual Studio likes to have a constant connection open to it, but obviously that wasn’t going to happen. Luckily, it is possible to work on a solution with no connection to TFS.

If you were just starting some work…

If Visual Studio was open when TFS went off-line then it won’t allow you to check out any files. If all your files are checked in already, then you can just shut down Visual Studio and then start again. When the solution opens it detects that TFS is gone and offers to open the project in Offline mode:

Image may be NSFW.
Clik here to view.
Go Offline
TFS Go Offline

When TFS is available again you can simply reconnect to the server by selecting the Team?Connect to Team Foundation Server… menu. Once you are connected, you can right-click the solution and select “Go Online“.

You’ll get a dialog that asks to to confirm the files that you’ve changed in the meantime:

Image may be NSFW.
Clik here to view.
Go Online
TFS Go Online

It will then take a few moments for TFS to catch up (I have quite a large solution, so it took about a minute for me) then the files appeared in the Pending Changes window ready to be checked in as normal.

If you were in the middle of something

If you already had files checked out when TFS went offline then this post about converting to offline may be more useful to you.

There is also a Visual Studio extension, if you prefer not having to restart Visual Studio called Go Offline. Once installed, just to to File?Source Control?Go Offline. This may be a more useful solution if you are constantly going in and out of connection with TFS (a mobile broadband connection on a train for example).


Filed under: Software Development, Tip of the Day Tagged: Source Control, TFS, TFS 2010, Visual Studio 2010 Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 5

Trending Articles