'Common Library: NuGet versus shared .csproj file. What's the best approach?
I have a fairly complex project that produces around 10 different executables. All these projects have a Common Library also developed by me for the purpose of sharing code between them. (think of it as being the root node of a dependency tree).
Because each of these 10 executables is fairly complex and has other specific libraries, I have actually around 4 or 5 different Visual Studio solutions to have the functionality a bit more contained and also to avoid mixing together completely unrelated executables.
I would like to know which of these two options is the best way to manage my Common Library project (how is the community doing this):
- Should it live in an internal NuGet repository and then all executable projects depend on it via NuGet?
- Should I keep having the same .csproj file for the Common Library used in the 5 different Visual Studio solutions?
I know there are pros and cons for each of these approaches. I would just like to know what people are doing out there.
Thanks, rui
Solution 1:[1]
I would recommend the NuGet option.
It works much better if you are using different versions of your shared projects. i.e. You don't require to update all other projects immediately if the shared library is changed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Stefan |
