10
Packing, consuming and debugging reusable .net core components using Azure and NuGet

Packing, consuming and debugging reusable .net core components using Azure and NuGet

6 years ago
Anonymous $Dftgs0JzgE

https://medium.com/@mike.c.birt/packing-consuming-and-debugging-reusable-net-core-components-using-azure-and-nuget-205f78c38e3a

Continuing on our journey from full .net monolith to .net core microservice and getting practical about code. When we were developing a monolith things were easy (to start with right!) because it was a single solution. All of our ‘common’ code just lived right there in the solution with all the other projects that used it. It all built together. But now we’re creating our separate solutions for our separate microservices — where does all this stuff go now? Our base classes for services, our base classes for our processes, our useful utilities etc… the simple answer, and the nice answer — nuget! Let’s pre-build them and publish them as nuget packages. Yay.

This post will explain how to do just that. How to take your ‘common’ code, create the dedicated repo, create your azure pipeline to publish nuget artifacts and how to consume these via visual studio back into your consumer projects. That might be enough, and it’s simple as azure is doing lots of work for you. However I’ll finish by explaining our simple approach to making these packages debug-able, which works for us because our packages are only internal, used by teams on the same projects.