gpt4 book ai didi

tfs - 将内部 NuGet 服务器添加到 TFS 构建服务器?

转载 作者:行者123 更新时间:2023-12-04 20:54:52 26 4
gpt4 key购买 nike

我们有一个私有(private)的 NuGet 服务器,我的问题是 TFS 2017 构建不识别内部包的 NuGet 服务器,显然,没有指定 URL。我已经尝试将它放入 Nuget.config 并且它有效,但存在一些问题。

然而,我想做的是以某种方式将其添加到全局提要列表中。我没有在服务器上安装 NuGet,尽管 NuGet 还原是作为构建任务发生的,所以它存在于 c:_work_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.21\等下,并且看不到任何会让我更改提要集。

顺便说一句,当我向 nuget.config 添加包源时,它似乎只从该源下载并忽略了所有默认值,例如 nuget.org 等。

如何添加内部 nuget 服务器,以便我的所有构建 native 都可以访问它?谢谢。

最佳答案

通常您只需将提要(同时添加 nuget.org 源)添加到 NuGet.config文件,然后 checkin 文件。

(如果您使用第三个私有(private) NuGet 服务器,那么您可以尝试使用 Package Management in VSTS and TFS )

例如

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- remove any machine-wide sources with <clear/> -->
<clear />
<!-- add a VSTS feed -->
<add key="MyGreatFeed" value="https://fabrikam.pkgs.visualstudio.com/DefaultCollection/_packaging/MyGreatFeed/nuget/v3/index.json" />
<!-- also get packages from the NuGet Gallery -->
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>

For this issue : "it seemed to ONLY download from that source and ignored all the defaults, such as nuget.org, etc."



确保您已正确设置 NuGet.config文件和 nuget.org不排除来源。

在 Build 中恢复 NuGet 包您可以按照以下文章中提到的步骤进行操作:

Restore Package Management NuGet packages in Team Build

  • If you've checked in a NuGet.config, select Feeds in my NuGet.config and select the file from your repo.
  • If you're using a single VSTS/TFS feed, select the Feed(s) I select here option and select your feed from the dropdown.

关于tfs - 将内部 NuGet 服务器添加到 TFS 构建服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47819732/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com