Nuget files are packed in the wrong places

I have a specified nuget file with a file specification:

   <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>

It was:

   <files>
     <file src="content\*" target="content" />
     <file src="readme.txt" target="" />
   </files>

but it also showed odd behavior (specifically App_Start was not included, although an additional content folder was still 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

It seems like a strange behavior for me is that the NuGet package creates 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, regarding the nuget packaging file paths:

  • Why is readme.txt duplicated in two places?
  • Why are views assigned a second "content" folder? (while App_Start is not working)
  • How can I make a copy of my content folder with an accurately reflected actual structure?
  • <file src="content\*" target="content" />, nuspec ""

, .csproj .

+5
2

, , IMO. , , , , ........

, , sub dir , sub dir, , .

<file src="Scripts\" target="content\Scripts" />
0

, , , .csproject nuget pack MyProject.csproj, , nuspec . , , , nuspec , , .

, , .nuspec. nuget pack MyProject.nuspec , nuspec, , .

, , , , Nuget Package Explorer, nuspec , , , . , .

Edit

... - .csproj, .nuspec, .

, , .nuspec .

0

All Articles