4

This question is similar but doesn't quite help me.

I'm using the following <file> tag to try to add all files except for one folder, but it's not working.

<file src="**" exclude="BuildConfig" />

** successfully copies all folders and contents, but the exclude isn't working.

I have tried several variations:

<file src="**" exclude="**\BuildConfig" />
<file src="**" exclude="**\BuildConfig\*" />
<file src="**" exclude="**\BuildConfig\*.*" />
// mentioned in the question above, not sure why you would need to .. back if it's a root folder
<file src="**" exclude="..\BuildConfig\*.*" /> 

And basically every combination I could think of.

My output nuget zip looks like this:

- App
- App_Data
- BuildConfig
- Views
- etc

How can I exclude this folder at the root level while doing an include all?

I'm building this using octopack for octopus deploy, if that matters.

DLeh
  • 23,806
  • 16
  • 84
  • 128

1 Answers1

4

Figured it out. I was trying to do BuildConfig\* which wasn't finding files, because they were all in subfolders.

The following script removed all files from the BuildConfig folder and subfolders, causing the folder to not be included:

<file src="**" exclude="**\BuildConfig\**" />
DLeh
  • 23,806
  • 16
  • 84
  • 128