In TFS, how can I share source files in different location, in same machine, without sharing the full project

梦想的初衷 提交于 2019-12-12 05:39:35

问题


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.

  1. Create a new empty workspace
  2. Select those files which you want to share
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!