一、nuget打包发布
1.1、安装npe(NuGet Package Explorer)
1.1.1、微软商店安装

1.1.2、下载安装
https://npenightly.blob.core.windows.net/nightly/install.html
二、类库打包
2.1、VS打包
2.1.1、修改编辑属性

- 选择打包一栏,填写包内容,注意包版本,理论上,生成的预览包,应该比线上包高一个版本。
- 包版本规则(仅供参考):大版本.小版本.补丁,理论上,非大版本更新,尽量兼容历史版本。
2.1.2、打包

- 点击打包
- 会在类库路径bin Debug或Release目录下生成.nupkg后缀文件
- 建议使用Release模式
2.2、使用npe将dll打包成nupkg
此处只是简单展示。
-
1、打开npe
创建一个新的nuget包
-
2、创建lib夹
创建lib文件夹
-
3、选择dll支持的.net运行时
选择运行时
-
4、添加dll文件
添加dll文件
2.3、编辑属性

三、发布
此处发布到私有nuget服务
3.1、获取nuget服务配置
- 地址:一般iis部署,nuget服务是ip:port/nuget,如果docker部署,nuget服务是ip:port/
- AppId:在nuget配置文件里,找到appid,一般是32位guid
3.1.1、发布



网友评论