使用 TFS Build 2015 从自定义 Nugetserver 还原 NuGet 包 [英] Restoring NuGet packages from custom Nugetserver using TFS Build 2015
问题描述
我们的源代码管理中有大量解决方案,它们都使用来自自定义源的 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屋!