At the moment when unmapping a source on TFS Source Control in Visual Studio 2010, the local down开发者_如何学编程loaded files are removed automatically.
How can I keep them untouched?
Nam.
In VS2012
"You can remove the mapping in the Manage Workspaces dialog (File -> Source Control -> Advanced -> Workspaces...) Pick your workspace and select edit, remove the entry for that mapping. Then hit OK. When prompted to perform a Get you can say "no" and the items will stay on your local disk until you next perform a Get."
I added some more information on to it.
Source: Remove Mapping
Just in case anyone else need help with this because i went for hours searching for the solution....and this is the way to see all the mappings you have and remove them if wanted without deleting local files.
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.
精彩评论