我应该如何告诉TeamCity的NuGet安装程序构建步骤,以同时使用NuGet.org和TeamCity提供的软件包源? [英] How should I tell TeamCity's NuGet Installer build step to use both NuGet.org and the TeamCity provided packages source?

查看:109
本文介绍了我应该如何告诉TeamCity的NuGet安装程序构建步骤,以同时使用NuGet.org和TeamCity提供的软件包源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的NuGet Installer构建步骤遇到了麻烦.

I'm having trouble with my NuGet Installer build step.

我们同时使用了官方的NuGet.org软件包和在TeamCity NuGet服务器上托管的我们自己的软件包.如果我将Packages Sources保留为空白,则可以找到nuget.org的软件包,但是当我将%teamcity.nuget.feed.server%指定为软件包源时,便找不到nuget.org的软件包.

We're using both official NuGet.org packages and our own packages hosted on the TeamCity NuGet server. If I leave Packages Sources blank, then packages from nuget.org are found, but as soon as I specify %teamcity.nuget.feed.server% as the package source, then packages from nuget.org are not found.

我尝试将Packages Sources设置为同时包含两者,但仍不适用于nuget.org官方软件包.

I tried setting Packages Sources to include both, but it still isn't working for official nuget.org packages.

https://nuget.org/api/v2/
%teamcity.nuget.feed.server%

这不是nuget.org软件包源的正确URL吗?我如何告诉它同时使用两个来源?

Is that not the right URL for the nuget.org package source? How do I tell it to use both sources?

我在 JetBrains开发人员讨论板上进行了询问,但没有得到任何答复回应.

I asked this on the JetBrains Developer discussion board, but haven't gotten any responses.

推荐答案

显然,甚至不需要NuGet安装程序的构建步骤.我编辑了.nuget/NuGet.targets文件以包括这两个路径,并删除了NuGet Installer构建步骤,该文件现在可以使用.

Apparently the NuGet Installer build step is not even needed. I edited the .nuget/NuGet.targets file to include both paths and removed the NuGet Installer build step and it works now.

最初为该解决方案设置TeamCity时,如果没有NuGet Installer步骤,该功能将无法正常工作,因此,我不知道我为完成此工作还做了哪些不同的工作,但也许NuGet.targets文件是一直键.

When originally setting up TeamCity for this solution, it didn't work without the NuGet Installer step, so I don't know what else I've done differently to make this work, but maybe the NuGet.targets file was the key all along.

此博客文章的评论为我指明了正确的方向.

The comment on this blog post pointed me in the right direction.

这篇关于我应该如何告诉TeamCity的NuGet安装程序构建步骤,以同时使用NuGet.org和TeamCity提供的软件包源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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