[英]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.