Latest Tinkerings: Nuget Automation

It's a fairly common problem I think, but not one I've found many obvious solutions to. I have two sets of projects LibraryA and ApplicationB.

LibraryA is a set of fairly generic functionality (think functions like logging, http calls, security and so on). Functionality that will be used across a variety of apps. I don't know exactly what I want in LibraryA yet, I've got a few ideas but a lot of the time what I put in LibraryA will be determined by my work on ApplicationB. I'll often come up with an idea of something to go in LibraryA as I work on ApplicationB.

With this in mind I have two options:

The first option can be tempting, it's certainly fast and easy, but it has problems as the project grows, a solution containing not just the core code for the application but also a whole bunch of generic code is quickly going to become bloated. The second option is better in the long term as both sets of code mature but it's often a pain to make a change in LibraryA, publish it and then update the reference in ApplicationB, but this can be tricky when you're working across the two separate sets of code.

So, the latest project is an attempt to take a lot of the gruntwork out of the second option. The plan is to create a simple command line utility that automates the Nuget publishing, raising the version numbers etc, in addition I'm hoping to also give it the ability to publish preview versions of the package to a local repository only to avoid filling the official nuget feed with too much detritus.

We'll have to see how it goes.

Published on 11:16:53 12 Mar 2025