ASP.NET MVC folder structure and NuGet

前端 未结 4 731
南方客
南方客 2020-12-15 15:56

I want a custom directory structure for my Content in my MVC project for example:

\\Content
    --\\js
    --\\css
    --\\img

Is it possib

4条回答
  •  离开以前
    2020-12-15 16:26

    The answer to this is "no" because the "Content" folder is one of the Nuget's convention folders. However, if you rename your Content folder to, for instance, public and then have Nuget pack your public/js folder then when you bring the package in it will extract the files to the public/js folder.

    Since I started to use Nuget I switched to using public for my public content instead of Content and rather use Content for files that I want to bring in untouched like source files (see here one usage of Content).

提交回复
热议问题