With NuGet finally bringing .NET dependency management into 21st century, an outstanding problem remaining for anyone who does custom builds of dependencies is that of storing them.
I like my dependencies resolved at build time, so that they don’t burden my source code repository. Which is fine, it’s easy to include custom steps to bring them in. However if I have to modify a dependency, which happens fairly often with open source, but remain in the NuGet world of managing it, I have a problem – I can’t upload this dependency to the public NuGet gallery (wouldn’t make sense even if I could).
Custom NuGet gallery to the rescue!
With NuGet gallery being an open-source we were able to setup a custom build that allows updating the packages. This allows us to keep the version number of the dependency while changing anything we need in it, which is a big deal when dealing with modern day dependency trees.
The workflow we use:
- Disable public gallery
- Temporarely enable public gallery to bring in a dependecy
- Push it to the private gallery
- Modify the package if needed and update the private gallery
- Enjoy your unbroken dependency chain
I wonder how other people are doing this…