How to manually replace a set of files on TFS?

Posted: (EET/GMT+2)

 

If you are traveling a lot and are sometimes unable to work online (for example, while on a plane), you might have run into a problem with Visual Studio and Team Foundation Server (TFS): how should you work offline?

If you are lucky enough to be able to start your offline work by simply checking out files from TFS, then there is nothing special: you can simply check in your files once you return the office or where ever you have a network connection.

However, if you simply have an offline copy of the latest source (say, a ZIP file) and just load the project into Visual Studio, Visual Studio will ask whether you want to work without version control. Answer yes, and do your development normally.

When you return to the office, go ahead and check out the whole set of project files, for instance the whole project node. Then, using Windows Explorer, replace the files that you checked out with the versions you edited, and check in everything. Team Foundation Server will include only changed files in the changeset; thus there is no risk in replacing everything, including files that you did not edit.

Problem solved. As an additional tip on how to work offline, check out this video on MSDN.