创建自定义包并将其推送到Nuget Server [英] Creating and Pushing custom packages to Nuget Server

查看:182
本文介绍了创建自定义包并将其推送到Nuget Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Folks,


我在构建和部署过程中没有很好的曝光率。目前我需要将自定义程序集转换为nuget包并推送到nuget服务器。我们有Nuget Server,并且能够使用nuget push
-source -apikey命令行手动推送软件包。


要求我们有几个共同的项目在业务中共享单元。当我们签入这些项目时,我们需要触发MSbuild,生成nuget包并自动推送到nuget服务器。我们没有使用.Net标准版或核心库
我们使用.Net Framework库。 


您能否帮我推荐任何解释MSbuild的网站或文档创建并推送teh包到nuget服务器?我们是否需要在构建服务器中安装nuget.exe并添加依赖项,我们如何在
MSBuild中编辑某个nuspec文件?


感谢您的帮助。


问候


Arun



解决方案

Hi Pulikk,



感谢您在此发帖。



您可以使用以下链接中的NuGet Packager任务首先创建nuget包:


https://www.visualstudio.com/en-us/docs/build/steps/package/nuget-packager


那么你可以使用Nuget Publisher任务发布nuget包:


https://www.visualstudio.com/en-us/docs/build/steps/package/nuget-publisher


您无需进入在构建服务器上停止nuget.exe。



最好的问候


Limitxiao Gao


Hi Folks,

I dont have very good exposure on Build and Deployment process. Currently i have a requirement where to convert custom assemblies to nuget packages and push to nuget server. We have Nuget Server and im able to push the packages manually using nuget push -source -apikey command line.

Requirement is we have few common projects which being shared across teh business unit. When we check-in those projects we need to trigger MSbuild, generate nuget package and push to nuget server automatically. We are not using .Net Standard or Core library we rae using .Net Framework library. 

Could you please help me on referring any sites or docs which explains the MSbuild which create and push teh package to nuget server? Do we need to install nuget.exe in teh build server and for adding dependencies, how can we edit teh nuspec file in teh MSBuild?

Appreciate your help on this.

Regards

Arun

解决方案

Hi Pulikk,

Thank you for posting here.

You could use the NuGet Packager task in the following link to create nuget package first:

https://www.visualstudio.com/en-us/docs/build/steps/package/nuget-packager

Then you could use the Nuget Publisher task to publish the nuget package:

https://www.visualstudio.com/en-us/docs/build/steps/package/nuget-publisher

You do not need to install nuget.exe on the build server.

Best Regards

Limitxiao Gao


这篇关于创建自定义包并将其推送到Nuget Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆