How do I model a 'Central Library' in TFS 2010?

不想你离开。 提交于 2019-12-04 19:38:33

If I understand you correctly, you can map this in your local workspaces if you have say:

$/.../Projects/YourProject

and

$/.../Libs/LibA

You can set your local workspace to

Status  Source Control Folder        Local Folder
Active  $/.../Projects/YourProject   C:\..\YourProject
Active  $/.../Libs/LibA              C:\..\YourProject\Libs

So your libraries can exist anywhere in your TFS project, but locally they will be available in a reasonable location for you to add to your solution. Any changes you make can then be saved correctly in the respository, and anyone else working using those shared projects will see it locally in their workspace when it's updated.

Update:

If you want to use branched version, say you have

$/.../Customer1/Libs/LibA

and

$/.../Customer2/Libs/LibA

Both are branched off

$/.../Libs/LibA

If you're doing work for Customer1, then you change your mapping from

Active  $/.../Libs/LibA              C:\..\YourProject\Libs

to

Active  $/.../Customer1/Libs/LibA    C:\..\YourProject\Libs

Everything should still be in the same place as the Local Folder hasn't changed.

(tbh, this isn't an brilliant example, but I hope it makes it a bit clearer or gives you some ideas!)

Is such a structure a way for you to go?

Now you can start your Client 1 and branch the mainline of Common Lib A to Client 1/devline/Common Lib A

If you made changes in the Common Lib A and are finished you can merge the branch in Client 1 with the mainline or possible better an integration line.

An other solution is to use the common lib in client applications as assemblies which I prefer.

If I come in the situation that something is missing in the Common lib I create a new requirement/backlog item for the common lib (it has an extra area path) and implement it in the branch of the Common Lib A, test it and deploy it to my application(s).

You can take a look at the branching guide if not already done, perhaps you get more ideas.

Edit based on comment

When you branch you can specify the folder via browse. There you select your target branch.

After done that, you can add the sources of Common Lib A in you client solutions.

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