使用 TFS Build 2015 从自定义 Nugetserver 还原 NuGet 包 [英] Restoring NuGet packages from custom Nugetserver using TFS Build 2015

查看:73
本文介绍了使用 TFS Build 2015 从自定义 Nugetserver 还原 NuGet 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的源代码管理中有大量解决方案,它们都使用来自自定义源的 NuGet 包 (

NuGet 安装程序步骤可让我们从自定义资源恢复我们的包:

但是,自定义 NuGet 服务器目录中没有 NuGet.exe 文件.正如

解决方案

您正在NuGet.exe 的路径"字段中指定命令行参数.如果您想使用与构建代理中包含的版本不同的 NuGet 版本,则应使用该字段.

您需要做的是解决您的问题:

  • 将您的自定义 NuGet 服务器添加到机器的 NuGet.config

  • 将您的自定义 NuGet 服务器添加到应用程序的 NuGet.config.

有关详细信息,请参阅 NuGet 文档.

We have a large number of solutions in our source control, which all use NuGet packages from a custom source (http://nugetserver/nuget). All solutions restore and build successfully locally within Visual Studio.

Using the new TFS 2015, our build definition looks like this:

The NuGet Installer step is there for us to restore our packages from a custom resource:

There is however no NuGet.exe file in the custom NuGet server directory. As suggested here tried just setting the -source to "https://www.nuget.org/api/v2/". We receive the same error at build whichever source we use:

解决方案

You're specifying a command line argument in the "Path to NuGet.exe" field. That field should be used if you want to use a different version of NuGet than the one that's baked into the build agent.

What you need to do to solve your problem is:

  • Add your custom NuGet server to the machine's NuGet.config

or

  • Add your custom NuGet server to the application's NuGet.config.

See the NuGet docs for more info.

这篇关于使用 TFS Build 2015 从自定义 Nugetserver 还原 NuGet 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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