I have a nuget spec file with the file spec:
<files>
<file src="content\App_Start\*" target="content\App_Start" />
<file src="content\Views\*" target="content\Views" />
<file src="content\web.config.transform" target="content" />
<file src="readme.txt" target="" />
</files>
This used to be:
<files>
<file src="content\*" target="content" />
<file src="readme.txt" target="" />
</files>
but that had odd behaviour as well (spefically the App_Start wasn't being included, though the extra content folder was still being added for the views ... see description below)
The project itself is arranged in the format
\<root>
|_ readme.txt
|_ content
|_ Views
| |_ Home
| |_ <viewname>.cshtml
| |_ <viewname2>.cshtml
|_ App_Start
|_ <PreprocessFilename>.cs.pp
What appears to be odd behavior to me however is that NuGet pack is producing a zip file with the structure:
\<root>
|_ readme.txt
|_ content
|_ content
| |_ Views
| |_ Home
| |_ <viewname>.cshtml
| |_ <viewname2>.cshtml
|_ App_Start
| |_ <PreprocessFilename>.cs.pp
|_ readme.txt
So with respect to nuget packaging file paths:
- Why is readme.txt being duplicated in two places?
- Why are the views being given a second 'content' sub folder? (while App_Start isn't)
- How can I make the copy of my content folder reflect precisely what the actual structure is?
- How can I return to the
<file src="content\*" target="content" />
directive to make the nuspec file more "maintainable"
If it is relevant, I am using a .csproj
file to create the package.