Reading List

How to create a NuGet package from a .NET Core class library

I’ve built a few class libraries recently but in order to use them in other projects they need to be created as a NuGet package and uploaded. The easiest way to creat the NuGet package is to add a script section to the projects project.json file telling it to create a NuGet package after it’s built.

To pre-populate a couple of the fields in the in NuGet when the package is uploaded the assembly information in the application tab of the project properties should be filled in. Project versioning is also controlled from here.

The package will then be created in the Debug or Release folder of the project depending on which is selected in the project.

In Visual Studio 2017 NuGet package creation is much easier as there is now a “Generate NuGet package on build” option in the Package tab of the project properties.

Related Posts

Returning Image Files From an Azure Function Azure functions (at least HTTP triggered ones) are essentially stateless APIs and so should be able to return files as well as other output objects such as JSON. Read more…

Creating .NET Core 2.0 Azure Functions If you want to create an Azure Function in .NET Core 2.0 rather than a .NET Framework 4.6.1 function you’ll first need to install the “Azure development” workload into Read more…

Uploading Files to Azure Blob Storage from the Browser As part of an ongoing project I’ve been trying to upload files from from the browser to an ASP.NET Core MVC site, however there appears to Read more…