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.
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\**" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With