DEV Community

Zohar Peled
Zohar Peled

Posted on

How to automate nuget updates?

In the company I work for we host a nuget service, containing mostly infrastructure Dlls and stuff like that.

Every once in a while someone makes a braking change to a service one of these Dlls is talking with (not necessarily the same Dll every time), so that all applications and services using that dll must update the nuget reference, update their own version, rebuild, and either be published to nuget themselves, or installed as services on the client's server.

Currently, we do that manually - opening each solution in VS, and as I'm sure you can guess, that process is both extremely annoying and time consuming.

I'm looking for a way to automate this entire thing - preferably using c# to do all the heavy lifting for us - update the relevant package, update the version number, and rebuild. Of course this should be configurable - what projects to handle and what packages to update.

So before I start making suggestions to my team leader about wanting to build such a thing - I thought I'd better ask around if anyone knows of such a tool already existing out there (doesn't even have to be a free tool), preferably an open source c# so that we could mess around with it's internals if need to.

Thanks in advance,
Zohar.

Top comments (7)

Collapse
 
coder8576 profile image
coder8576

How did you end up doing this? I'm looking to do the same thing and haven't found any good solutions yet.

Collapse
 
peledzohar profile image
Zohar Peled

I didn't have too much time back then to check it out, so I've left the subject.
Finally I've ended up switching to a different work place where we have DevOps people to handle this... Sorry for not being able to help more.

Collapse
 
vamsitp profile image
Vamsi TP
Collapse
 
peledzohar profile image
Zohar Peled

Thanks - this helps with several things - updating a specific nuget to a specific version, rebuilding the project and even publishing it (btw, wouldn't that work only for .Net core? we still have some older framework projects...) - but I didn't see where and how I can automate the version number increase... any pointers on that (if I still have to manually open VS it's kind of a deal breaker - and I don't really want to have to manipulate files programmatically either if I can avoid it)

Collapse
 
vamsitp profile image
Vamsi TP
Thread Thread
 
peledzohar profile image
Zohar Peled

Thanks, I'll give it a shot when I'll find the time...

Collapse
 
vamsitp profile image
Vamsi TP

And upgrade is automatic when you use those commands... Check the docs...