Friday 20 June 2008

Team Foundation Server 2005 - adding files when offline

I've recently been given a laptop at work to be able to work on the commute between my home (Leamington Spa) and work (Reading) and here comes the issue, TFS doesn't like it much when working disconnected.

I've done some research online and found that some of the issues which TFS has in 2005 version are addressed in 2008, but as we won't be uprading for a while I need to live with 2005.

This morning on the way to work I needed to add a new workflow activity to my project so I could carry on with work, obviously right click > add new item > activity, TFS client moans about not being able to connect to the server (no really?!) and VS adds the file with no source control bindings. The file is added and I can edit it, compile etc and work away fine on it. However the issue comes to making sure it gets added to source control for when I check it in it doesn't break the automated build. Due to this issue I decided that if I added / edited a file when offline I'd make a note of which and to add it / check it out when I got into the office.

I got in this morning and connected the wireless, went to source control viewer to add it in and couldn't find the folder where it exists (even though its in an existing folder) ... hmmm strange. So, found the file in solution explorer, right click > ... no "Add to Source Control" which is a bit rubbish. However there is a really simple solution ...

If you right click on the file in question and exclude it from the project, save the project file, click on the "Show all files" button at the top of solution explorer and find the file in the greyed out version, right click and add to project ... it gets added to source control :-)

No comments: