下载地址:https://www.nuget.org/downloadsapi
官网地址:https://www.nuget.org/服务器
建立一个Keyui
建立完成后点击copy,保存起来。由于之后没法再次复制密钥!!!spa
nuspec是NuGet将项目打包成nupkg的输入文件,能够经过nuget spec
命令产生。code
NugetTest.nuspec
文件注意里面的$xxx$
宏,这些就是引用了AssemblyInfo.cs
中的设置值,在编译产生package的时候,会使用AssemblyInfo.cs
中的相应值进行替换。完成编辑后,咱们的nuspec文件以下:blog
总结:开发
1.经过命令 nuget setapikey xxxxx-xxxx-xxx-xxxx-xxxx-xxxx , 设置API Key;文档
2.经过命令 nuget spec 生成xxxx.nuspec文件;get
3.经过命令 nuget pack xxxxxx.csproj 生成xxxx.nupkg文件;编译
4.经过命令 nuget.exe push xxxxx.nupkg -Source https://www.nuget.org ,将NuGet发布到服务器。
Everything1.4安装包下载:https://pan.baidu.com/s/1e-fisP7y9bCWHsMsxamYAg 提取码: w8su
参考文档:https://docs.microsoft.com/zh-cn/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli