John Robbins’ approach to working offline with Team Foundation Server

John Robbins has written a post called Working Offline with TFS.  In it, he describes his approach to using Visual Studio when not connected to the Team Foundation Server.  As many of you know, the server information is stored in the .sln file, and VS tries to connect to the server whenever you open a solution that contains the server information in its source control bindings.  To make things go more quickly, he wrote a couple of custom MSBuild tasks to automate the process of adding and removing the bindings the solution files.  While you don't have to remove the bindings while you're offline, it certainly makes opening the solution quicker when you know you can't get to the server.

For synchronizing with the server when he's connected again, he wrote an MSBuild task that wraps tfpt to use the online command.  The online command will find and pend edits for any files in version control that are writable and don't already have a pending edit.  Optionally, it will find additions and deletions (and there more options still -- run tfpt online /help for more information).

He pointed out a bug in tfpt.exe such that there's not way to get the online command's dialog when standard out is redirected, which was also a bug in tf.exe.  It's correct that the default is no GUI or other prompting when standard out is redirected, but we had intended to allow a way to get the GUI in that case.  I fixed the bug in tfpt.exe to add the /prompt switch.  We had already fixed the Orcas tf.exe a while back.  So, the problem with not getting the online command's dialog as he describes will be fixed when the updated tfpt.exe is released, so long as you add /prompt (I don't know when, but it's not too far off in the future).

[UPDATE 01/11/07]  I've changed the last paragraph to clarify the bug I described.

tags: , , , , ,

Comments (5)

  1. Martin says:

    I never knew that it was classed as a "bug" that you didn’t get prompted when stdout was being redirected – I always regarded it as a neat feature.   So is the behavior now that you have to explicitly ask for /prompt if you wanted a GUI when redirecting stdout (i.e. any scripts that were redirecting stdout without explicitly stating /noprompt will still work fine?)

  2. buckh says:

    Martin, what I wrote originally wasn’t very clear.  I’ve updated the last paragraph.

    Yes, that’s correct.


  3. Rob Caron on Visual Studio Code Name "Orcas" Related CTP Downloads. Buck Hodges on John Robbins’ approach…

  4. Adam says:

    I dont suppose you could give the release guys a nudge and tell them about all the team server fans who’d just love this fix to go out…

  5. buckh says:

    For tfpt.exe, I checked in the fix, so it will be in the next power tools release when it comes out (not sure exactly, but it shouldn’t too far off).

    For tf.exe, unfortunately the answer is that you’ll have to wait until Orcas.  Sorry about that.


Skip to main content