I am attempting to collect a series of Razor views into a NuGet package using .nuspec <files>
elements. My project structure is non-standard, however, for reasons I won't get into, I cannot change it.
Here's my project structure:
* Project
* Bar
* code
* Bar.csproj <-- OctoPack initiated from here
* Views
* Bar
* View1.cshtml
* View2.cshtml
* Baz
* code
* Views
* Baz
* View3.cshtml
* View4.cshtml
* Qux
* code
* Views
* Qux
* View5.cshtml
* View6.cshtml
... and here is what I'm after:
Desired Result
* Views
* Bar
* View1.cshtml
* View2.cshtml
* Baz
* View3.cshtml
* View4.cshtml
* Qux
* View5.cshtml
* View6.cshtml
Here is what i've tried:
Attempt #1
<file src="..\..\..\Project\*\code\Views\**\*.cshtml" target="Views" />
Strangely, the single wildcard becomes the recursive starting point, resulting in:
* Views
* Bar
* code
* Views
* View1.cshtml
* View2.cshtml
* Baz
* code
* Views
* View3.cshtml
* View4.cshtml
...
Attempt #2
<file src="..\..\..\Project\**\code\Views\**\*.cshtml" target="Views" />
Produces the same result as #1
Attempt #3
<file src="..\..\..\Project\*\code\Views\*\*.cshtml" target="Views" />
Results in the following:
* Views
* View1.cshtml
* View2.cshtml
* View3.cshtml
* View4.cshtml
* View5.cshtml
* View6.cshtml