We have pool of MSVS solutions (Solution “A”, “B”, “C”, … ) that share basic functionality in assembly called “Common.dll”.
There are 3-5 active solutions (that are under developing) while others are passive and hardly ever be rebuilt.
Common.dll is always under developing. There are several options how to keep my solutions code, what will you suggest and why?
A). Put common.dll source code to every solution. Pros: it will help active solutions to grow with common.dll side-by-side while passive solutions will be compilable. Cons: it’s hard to synchronize active common.dll code between active solutions
B). Put common.dll binary code to every solution. Pros: all projects will be compilable while common.dll code will be centralized. Cons: it’s hard to grow active solutions side-by-side with common.dll
C). Reference every project to last common.dll binaries looks like B. but it’ll bring problems with passive solutions if common.dll will grow and change it’s interfaces (some may say interfaces should always stay constant)
D). ?
Thank you in advance!
We practice something mostly like B.
A CI server makes sure that the common libraries are always up-to-date (even if they use other common libraries themselfes). Each solution which uses common libraries has a “Lib” folder where we put the build artefacts, but these are not under source control (in contrast to external artefacts, such as the ones imported though NuGet).
So while developing you don’t get problems because of breaking changes in the common libs and the developer chooses the point in time when he upgrades (but he always has to do that before he commits to the central repo).
The CI server will always copy the latest common libraries into the “Lib” of the solution under build, so that the latest common libraries are integrated. If we need to create a build with old libraries (specific hotfix release – very rare), we can always use the build artefacts with the matching date. Normal patch/fix releases are usually also upgraded to the latest common libraries though.