Do all of the projects that will use your models reside in the same solution?
If so, then don't use NuGet. You can- but keep in mind that the Visual Studio debugger won't respect breakpoints in blocks of code that are referenced as packages.
If not, then definitely use a NuGet package to share your models. Doing so can save you a lot of heartache when you need to update your models.
Deploying your models in NuGet packages will allow you to use different versions of your models across different projects, thus you won't need to update every single project when you make a change to those models.
This is how I do this stuff:
- Save your models into .NET Standard libraries (unless you have a specific reason not to)
- If you want to share the models with a project in a different solution, then deploy the .NET Standard libraries as NuGet packages (and install those packages in your other solution's projects)
- If you only need to share the models with projects in the same solution, then just add a (project) reference to the models library
If I ever need to debug the models project from one of my APIs that uses the models NuGet package, then I'll just swap the package reference for a project reference. You have to ensure that the local models project is in the same state as the referenced package before you begin debugging- but it doesn't take much time to do (if you're using Git or some other source control).
I hope this helps someone! BTW, this type of distribution works well for other types of projects as well- not just models!