问题
I want to publish some sample code for peoples, for example in CodeProject. But some source files (.cs files) are part of a large library that I don't want to publish completely.
How I can, in TFS 2012, share source files (.cs files) between 2 different projects (different location). That would let me update source as it would be updated by 2 different users, kind of.
I heard about Workspace but I'm not sure if it is the way to go and how I should do that?
I do not want to branch in order to only manage one version of each source file.
回答1:
You just need to create a local mapping of the source files to a different workspace folder. Map the folders, don't map the full project.
- Create a new empty workspace
- Select those files which you want to share
- Click not mapped beside Local Path, choose a local location to map and get your source files from server.
Now you have two copies of your soucre files but with different workspace in your dev machine . When "another person" want to use these files on your machine, he just need to select the new workspace to work on it.
来源:https://stackoverflow.com/questions/33904048/in-tfs-how-can-i-share-source-files-in-different-location-in-same-machine-wit