发布自己的nuget包

1.先到www.nuget.org注册账户,然后在用户中心获取apikey

2.到https://dist.nuget.org/index.html下载最新的nuget.exe,放到你的项目根目录下

3.开始——>Visual Studio2015——>Visual Studio Tools——>VS2015开发人员命令提示

在dos窗口下,用cd命令切换到你的项目根目录

输入命令:nuget spec 项目名称.nuspec

生成nuspec文件,并打开,修改里面的内容,如下:

4.用命令:nuget setapikey 你的apikey

设置apikey

5.用命令:nuget pack 你的项目名称.csproj

打包你的项目

6.命令:nuget push 你的项目名称.1.0.0.nupkg -Source https://www.nuget.org/api/v2/package

发布你的nuget包

原文地址:https://www.cnblogs.com/IWings/p/6148362.html