My company has a common code library which consists of many class libary projects along with supporting test projects. Each class library project outputs a single binary, e.g. Company.Common.Serialization.dll. Since we own the compiled, tested binaries as well as the source code, there's debate as to whether our consuming applications should use binary or project references.
Some arguments in favor of project references:
- Project references would allow users to debug and view all solution code without the overhead of loading additional projects/solutions.
- Project references would assist in keeping up with common component changes committed to the source control system as changes would be easily identifiable without the active solution.
Some arguments in favor of binary references:
- Binary references would simplify solutions and make for faster solution loading times.
- Binary references would allow developers to focus on new code rather than potentially being distracted by code which is already baked and proven stable.
- Binary references would force us to appropriately dogfood our stuff as we would be using the common library just as those outside of our organization would be required to do.
- Since a binary reference can't be debugged (stepped into), one would be forced to replicate and fix issues by extending the existing test projects rather than testing and fixing within the context of the consuming application alone.
- Binary references will ensure that concurrent development on the class library project will have no impact on the consuming application as a stable version of the binary will be referenced rather than an influx version. It would be the decision of the project lead whether or not to incorporate a newer release of the component if necessary.
What is your policy/preference when it comes to using project or binary references?