Search code examples
visual-studio-2010source-control-explorer

How to TFS-unmap without losing physical files?


At the moment when unmapping a source on TFS Source Control in Visual Studio 2010, the local downloaded files are removed automatically.

How can I keep them untouched?

Nam.


Solution

  • I have not seen this behavior. When un-mapping, are you choosing to re-download all files in the workspace? If so, choose not to do that, and the files should be preserved locally. Keep in mind that TFS is no longer tracking changes at that point, so it could get you into a lot of difficulty if you inadvertently make changes to those files.

    What kind of process are you trying to implement that you need to keep these files around after an unmap? Maybe there's a different way to accomplish what you need?

    --EDIT-- When you're doing this, files are just files, so you could:

    • do a Get of all files in that workspace
    • copy them to another folder on your hard drive
    • map that new folder
    • Do an "add files" on everything in the new folder structure
    • check in.

    You will have to rebind all of the projects/solutions to source control when you do this.