20
votes

I need to exclude some files from TC's artifacts during my ASP MVC project's build. These files include web.debug.config files, but there are others as well.

At the moment the Artifact path setting in TC looks like this:

src/Project.Web/*.config => arch.zip

I need somehow to tell it to skip the web.debug.config file. I tried this and doesn't work:

src/Project.Web/*.config => arch.zip

-src/Project.Web/*.debug.config

So, ideally I don't want these files from arch.zip that is created during the build.

2

2 Answers

18
votes

Starting from TC10 it's possible. In your case it would be:

+:src/Project.Web/*.config => arch.zip
-:src/Project.Web/*.debug.config => arch.zip
13
votes

This isn't possible the way you mentioned:

http://youtrack.jetbrains.com/issue/TW-5244

As a workaround until that issue is resolved, you can always create another build configuration with a snapshot dependency and an artefact dependency on your main build. Your main build outputs all of the files as artefacts. The configuration depending on this has an artefact dependency set to:

+:*.config => <replace with location>
-:*.debug.config

Then publish what you want from this configuration in the folder. Not ideal, but it will work.