2014-10-01 44 views
2

所以我有一個網站,我試圖爲Octopus Deploy打包。如何從nuget包中排除子目錄和內容

我有以下文件夾結構:

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

我試圖排除 「Dontwantthisfolder」

所以我nuspec看起來是這樣的:

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

雖然不工作,但我還是得到了「Dontwantthis」文件夾。

任何人都知道我可以做到這一點?

回答

4

你很接近。試試這個:

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

我能得到這個排除DontWantThis具有下列文件系統結構:

Root 
    | 
    Source 
     | 
     Test.nuspec 
    Web 
    | 
    Scripts 
      | 
      Script.js 
    Views 
     | 
     DontWantThis 
        | 
        Bad.cshml 
     WantThis 
       | 
       Good.cshtml 
     ... 
相關問題