TFS 2015 U1 vNext build发布工件始终失败,无法将工件与资源

时间:2016-01-21 20:05:38

标签: tfs tfs2015

尝试使用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

2 个答案:

答案 0 :(得分:6)

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

你应该使用" \ \ my \ share"在路径项而不是绝对路径。

答案 1 :(得分:0)

如果路径中包含带有方括号的文件夹名称,也会出现此错误。例如\\ servername \ afolder \ [foldername]。