Search code examples
tfstfs-2015

TFS 2015 U1 vNext build Publish Artifact always fails with Unable to associate artifact with resource


While trying to execute any vNext build with a Publish Artifact task we end up getting the following error

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

example log output

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

Solution

  • The issue is you specify the Path of Publish Artifact as "D:\BuildDrop\ASC Dev vNext\20160121.7".

    You should use "\ \ my\share" in Path item instead of a absolute path.