一、简介


1、nuget大家已经不陌生。

2、netcore默认引用便是nuget,并处理了嵌套关系。

3、netcore已经支持直接编译生成nuget包。

4、本文介绍如何把自己建立的项目发布为nuget程序包。

注意:netCore下的nuget包仅能包含dll,不支持任何静态文件。

 

二、准备工作


1、去nuget官方注册一个账号,也可以直接用微软账号登录。去注册

2、没有了。

 

三、创建项目生成nuget包


1、创建一个类库项目。

2、写代码,这个自己随便写了。

3、配置nuget包:在项目配置属性->打包设置。

4、生成nuget包:到bin下面可以看到nuget包。

  

NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

 NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

 NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

 

四、上传发布


1、上传编辑好的包。上传地址

2、等待后台处理,处理后会显示在列表中。

3、在vs中查看,引用。

 

NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

 

NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

NetCore偶尔有用篇:NetCore项目发布为Nuget包

 

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2022-02-16
  • 2021-06-10
  • 2021-06-01
  • 2021-07-10
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-11-16
  • 2022-01-21
  • 2021-08-08
相关资源
相似解决方案