ShadDS
ShadDS

Reputation: 23

Project reference integrity across many applications

Our code base has two ASP.NET MVC applications, several WinForm applications, and an assortment of console apps and WCF services. They are all based on the same set of domain class libraries, data access layer (NHibernate driven), and some infrastructure classes (common extension methods, 3rd party binaries, and abstract business logic).

To ensure reference integrity between applications, we have a solution called Builder. Builder contains every single project and recompiles all DLLs in a local workspace. This has worked well so far, but is becoming unmanageable, taking longer and longer to build.

We're looking to split up the code into more specific assemblies while retaining reference integrity. If someone changes our domain class, the rest of the team needs to rebuild Domain.dll, for example. It is bad practice to add binaries to source control, but we need to ensure everyone's on the same version.

It seems like a common consideration, but I haven't found any good articles addressing the issue specifically. Does anyone know of a best practice we can use for this? Thanks!

Upvotes: 2

Views: 76

Answers (2)

RBZ
RBZ

Reputation: 2074

Look into the other 6 solid principles. These other principles explain how to deal with managing these independently deploy-able modules.

Upvotes: 1

Adam Robinson
Adam Robinson

Reputation: 185693

If your projects are internal, you can just add the common projects to your solution and add project references (rather than ordinary assembly references) to the projects that use them. Assuming that your build time issues are coming from the fact that you have a great number of common projects and each individual solution would only use a few, this should mitigate the impact.

If your issue is that you need to ensure that project X and project Y are both using the same version of your common library, then referencing the binary (and storing it in source control) is your best approach. Build times are not something that can really be addressed by changing approaches, unfortunately.

As to what pattern to follow in source control, you'll need to tell us what product you're using.

Upvotes: 1

Related Questions