how to create and publish nuget package in .net framework

how to create and publish nuget package in .net framework

in this article, i will show you how to create and publish nuget package in the .net framework

step: 1 create an account at https://www.nuget.org/

step: 2 generate an API key(keep it safe) keep glob pattern to *

step: 3 create class library .net framework

step: 4 change assembly info (title, description, company, product, copyright), unload project...

step: 5 edit.csproj file and set configuration from "debug" to "release"

step: 6 go to https://www.nuget.org/downloads and download nuget.exe and paste it at the location where the .csproj file is

step: 7 open cmd and go to the same location and type command nuget spec "the csprojfile"

step: 8 open the newly create .nuspec file and fill in the values.

step: 9 compile and build the project in release

step: 10 run nuget pack

step: 11 run this command: nuget push {nugetpackagename}{API KEY} -Source https://api.nuget.org/v3/index.json"

Post a Comment

0 Comments