简体   繁体   English

Tfs vNext,Restore Nuget包构建步骤,如何配置多个源?

[英]Tfs vNext, Restore Nuget packages build step, how to configure multiple sources?

I have a Restore Nuget packages build step as part of my vNext (onsite premises TFS 2015) build. 我有一个Restore Nuget包构建步骤作为我的vNext(现场场所TFS 2015)构建的一部分。

This step allows you to configure Nuget arguments. 此步骤允许您配置Nuget参数。

Here I have configured the source to pull from a local network share, where we store internal Nuget packages. 在这里,我将源配置为从本地网络共享中提取,我们存储内部Nuget包。

-source "\\myNetworkShare\Nuget Packages"

However, we also use public Nuget packages, such as Postsharp, etc. 但是,我们也使用公共Nuget包,例如Postsharp等。

I want this step to resolve from multiple sources (or at least two). 我希望这一步从多个来源(或至少两个)解决。

1 being the internal network share, the other being the public nuget.org server. 1是内部网络共享,另一个是公共nuget.org服务器。

How is this possible? 这怎么可能?

Adding multiple source is supported in one NuGet config file. 一个NuGet配置文件支持添加多个源。 Specify your custom NuGet feed URL's and the public Nuget packages server's url in the solution's nuget.config file. 在解决方案的nuget.config文件中指定自定义NuGet提要URL和公共Nuget包服务器的URL。

在此输入图像描述

You need to set up your own nuget server instead of a local network share to hold the packages. 您需要设置自己的nuget服务器而不是本地网络共享来保存包。 Detail ways about this please refer How to host your own NuGet Server and Package Feed 详细说明请参阅如何托管您自己的NuGet Server和Package Feed

Next, just continue to execute the default NuGet Restore step from build task. 接下来,继续从构建任务执行默认的NuGet Restore步骤 Now all packages will be restored and can be continue with the build. 现在所有包都将被恢复,并且可以继续构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获取TFS2015 Build(Build.vnext)和NuGet包还原以使用自定义包源 - How to get TFS2015 Build (Build.vnext) and NuGet package restore to use custom package sources TFS2015 vNext构建:获取源代码的自定义步骤 - TFS2015 vNext build: Custom step to get sources TFS构建“获取源”步骤在WiX Toolset NuGet包上失败 - TFS build Get Sources step fail on WiX Toolset NuGet package TFS 无法恢复 nuget 包(开发 PC 构建正常) - TFS unable to restore nuget packages (dev PCs build ok) 如何在TFS 2013 Build Server上还原PCL引用的nuget包(带有project.json) - How to restore nuget packages referenced by PCL (with project.json) on TFS 2013 Build Server 如何配置VS解决方案以将tfs vnext构建与发布管理一起使用 - How to configure VS solution to use tfs vnext build with release management 在NuGet恢复时TFS构建失败 - TFS Build fails at NuGet restore 在Visual Studio Build步骤中使用NuGet Installer任务和“Restore Nuget Packages”有什么区别? - What's the difference using NuGet Installer task and “Restore Nuget Packages” in Visual Studio Build step? TFS和nuget:使用还原nuget软件包构建后,项目文件将永久签出 - Tfs and nuget: project files are forever in check out after build with restore nuget packages TFS Nuget Restore步骤无法访问代理 - TFS Nuget Restore step cannot access proxy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM