Yass
Yass

Reputation: 602

Excluding $tf folder in TFS 2015 - Copy and Publish Build Artifact

I'm trying to exclude $tf folder as part of artifact publishing using "Copy and Publish Artifacts" option as shown in the picture. But it always includes $tf folder and publishes all the files under this folder.

I tried this option, but no luck. https://social.msdn.microsoft.com/Forums/en-US/bb22c23e-cb44-44d2-8170-ba5609e9a688/need-help-excluding-the-tf-folder-and-sub-items?forum=TFService

"Copy files" is not an option for publishing artifacts, so it would be better if there is any option to exclude the folder. enter image description here

Upvotes: 5

Views: 2221

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33738

Using Copy Files and Publish Build Artifacts tasks instead:

  1. Copy Files: Source Folder: $(build.sourcesdirectory); Target Folder: $(build.artifactstagingdirectory);

Contents:

**\*
!$tf\**
!**\$tf\**
  1. Publish Build Artifacts: Path to Publish: $(build.artifactstagingdirectory)

Upvotes: 11

Related Questions