3

I've got app 2 solutions (.NET C#) which each share a portable class library (a seperate solution). The app solutions reference the PCL as a project, not by DLL.

What's the best way to deal with this scenario with source control? The portable class library may change for one version of one of the app solutions but not immediately for the other.

I'm not tied to any source control at the moment, I was attempting to do this with TFS but have workspace issues on the portable class library. I'm open for a better suggestion such as Mercurial or Git!

Jamie
  • 4,670
  • 5
  • 35
  • 49

2 Answers2

2

If the updates of your PTL should affect only one application, you can create branches (available with most source controls softwares).

If you have a branch for each application; updates will be visible only in this branch. Then you can use merge tools to update the other one.

Branches are also available in TFS : http://msdn.microsoft.com/en-us/library/ms181425.aspx

For strategies : Branching Strategies

Community
  • 1
  • 1
AlexH
  • 2,650
  • 1
  • 27
  • 35
  • The updates affect both applications but I think the thing I'm having trouble getting my head around is how it would work for releases. – Jamie Dec 04 '12 at 15:06
  • Each branch will contain its copy of the shared TPL, only the merge operation will synchronize those copies – AlexH Dec 04 '12 at 15:10
0

On way is to keep the shared library in a separate area of the source control system. Each project that depends on the shared library will then have to create a branch of the shared library that's specific to the project.

Development is isolated on the branch but you can merge changes on the project branch back to the main branch of the shared library. Other projects that already have branches of the shared library can decide if they want to merge changes to the main branch into their own branch.

You will have to perform some merging when the shared library is updated but using this setup you ensure that each project is isolated from changes performed in the other projects. Each project can decide when they want to upgrade to a newer version of the shared library.

Martin Liversage
  • 104,481
  • 22
  • 209
  • 256