4

So I've a website that I'm trying to package for Octopus Deploy.

I've the following folder structure:

Web | Views | WantThis Dontwantthis WantThis1 WantThis2 ... (lots more) Scripts

I'm trying to exclude the "Dontwantthisfolder"

So my nuspec looks like this:

... <file src="..\Web\Views\**\*.*" exclude="**\Dontwantthis\**" target="web\Views" /> ...

It's not working though, I still get the "Dontwantthis" folder.

Anyone know how I can achieve this?

Dave
  • 434
  • 5
  • 22
jaywayco
  • 5,846
  • 6
  • 25
  • 40

1 Answers1

5

You're quite close. Try this:

<files>
    <file src="..\Web\Views\**\*.*" exclude="..\Web\Views\DontWantThis\*" target="Web\Views" />
</files>

I was able to get this to exclude DontWantThis with the following file system structure:

Root
   |
   Source
        |
        Test.nuspec
   Web
     |
     Scripts
           |
           Script.js
     Views
         |
         DontWantThis
                    |
                    Bad.cshml
         WantThis
                |
                Good.cshtml
         ...
Mike Bailey
  • 12,479
  • 14
  • 66
  • 123