Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating classes used in multiple projects?

I have a few classes that are abstracted in a way that I can use them in multiple projects. I'm always working on these classes, optimizing, adding, etc. So when I optimize something in one of these classes, I then need to copy that new version into every project I remember using it. This isn't a very good way of doing it, but is there a better way?

Thanks

like image 699
Ben Avatar asked Jan 19 '23 05:01

Ben


1 Answers

Put these base classes in a single project and share this project between your different solutions as an referenced class library. This way you will not have to copy / paste anything between projects or solutions and everything should always be up to date.

You could even set-up a local NuGet feed so you can use NuGet to retrieve this shared project as a reference in a well structured and managed way.

like image 90
Johannes Kommer Avatar answered Jan 29 '23 00:01

Johannes Kommer