tRuEsAtM
tRuEsAtM

Reputation: 3678

How to exclude obj folder from a copy task in VSTS build?

I have tried multiple combinations in the Contents section, but still, the everytime obj folder is copied to my build.

Here's my source directory structure enter image description here

I have used following combinations for my Contents section:

1. **\!(obj|V1Server.vshost.exe|V1Server.vshost.exe.config|.pdb|.xml|.cache|.cs|.csproj|.CopyComplete|.ico|.resx|.resources|.txt) bin\$(BuildConfiguration) bin\App.config

2.obj\!(*)

3.!(obj)

4.!(obj)\

What is wrong with my pattern matching syntax?

Upvotes: 3

Views: 8835

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33708

Just use this code:

**
!**\obj\**

Upvotes: 9

Marina Liu
Marina Liu

Reputation: 38116

You just need to need below two lines to exclude obj folder in contents option:

**
!src\V1TCPIPService\obj\**

enter image description here

Upvotes: 4

Related Questions