【问题标题】:TFS 2015 U1 vNext build Publish Artifact always fails with Unable to associate artifact with resourceTFS 2015 U1 vNext 构建发布工件总是失败,无法将工件与资源关联
【发布时间】:2016-01-21 20:05:38
【问题描述】:

在尝试使用 Publish Artifact 任务执行任何 vNext 构建时,我们最终会收到以下错误

##[error]Unable to associate artifact with resource at location:[location]

示例日志输出

1 
2016-01-21T19:29:49.9838278Z Executing the powershell script: D:\Agent\tasks\PublishBuildArtifacts\1.0.4\PublishBuildArtifacts.ps1

2 
2016-01-21T19:29:50.1713333Z Preparing artifact content in staging folder D:\Agent\_work\1\a...

3 
2016-01-21T19:29:50.2338323Z Copying all files from D:\Agent\_work\1\s\ASC\ASC-Dev\CSDChangeControlDispatcher to D:\Agent\_work\1\a\CSDChangeControlDispatcher\CSDChangeControlDispatcher

4 
2016-01-21T19:29:50.4838343Z Copying all files from D:\Agent\_work\1\s\ASC\ASC-Dev\PrecompiledWeb\CSDChangeControlDispatcher to D:\Agent\_work\1\a\CSDChangeControlDispatcher\PrecompiledWeb\CSDChangeControlDispatcher

5 
2016-01-21T19:29:50.5150903Z Copying artifact content to D:\BuildDrop\ASC Dev vNext\20160121.7...

6 
2016-01-21T19:29:50.9369728Z Start: AssociateArtifact

7 
2016-01-21T19:29:50.9369728Z ##[error]Unable to associate artifact with resource at location:D:\BuildDrop\ASC Dev vNext\20160121.7.

8 
2016-01-21T19:29:50.9369728Z End: AssociateArtifact

【问题讨论】:

  • 这是在本地还是在 VSTS 上?如果在本地,您是否在文件共享上使用手动配置的放置文件夹?
  • @Wouter-de-Kort 它在本地并且它设置为在同一服务器上使用放置文件夹。 TFS 应用层和构建服务在同一个 VM 上运行,该文件夹也是我们之前在 2013 xaml 构建输出中使用的文件共享。即使任务失败,我们也会在该位置获得所有构建输出。

标签: tfs tfs-2015


【解决方案1】:

问题是您将发布工件的路径指定为“D:\BuildDrop\ASC Dev vNext\20160121.7”。

您应该在 Path 项中使用“\ \ my\share”而不是绝对路径。

【讨论】:

  • 你是圣人先生。更新到共享路径,一切正常。应该知道的。
  • 不知道为什么这被否决了,这是正确的答案。
  • @PaulSwetz 您将共享路径更新为什么? \\my\share\builddrop\....
  • 用格式更新了答案。 computername 很明显 sharefolder 是服务器上的任何共享文件夹名称。
【解决方案2】:

如果路径中包含带括号的文件夹名称,您也会收到此错误。例如 \\servername\afolder\[文件夹名]。

【讨论】:

    猜你喜欢
    • 2023-04-04
    • 1970-01-01
    • 2018-11-01
    • 2016-11-27
    • 2018-11-04
    • 2016-09-02
    • 1970-01-01
    • 2018-05-12
    • 2018-12-04
    相关资源
    最近更新 更多