Lets start with a great new for library maker with Visual Studio 2017. Now, when you create a library you can generate automatically also the NuGet package of it.
Lets see how it works.
In this scenario we want to publish a .net standard library for rest requests. We need to click with right button on the project:
Now click on “Package” menu item on your left in the project tab.
TADA! Here we can insert all data about package and, with “Generate NuGet package on build” we’ll get the NuGet package in the Release folder. This is great also for the dependencies that are all calculated by Visual Studio.