Content files location

Topics: General
Mar 1, 2013 at 3:18 AM
Edited Mar 1, 2013 at 3:27 AM
I am trying to create a NuGet package for a MVC website, this package is frequently updated and used as a base in multiple child modules.

By default, when adding a package to a project, NuGet adds the static contents (views, js, css, images) from the content folder back to the project structure. In my case, I just want to copy the static files to the files system, but not add these static files to the VS project.

My question:
When I create the package, can I make the NuGet add the statics files to a location other than 'content' folder? I can then use install.ps1 to copy the files from the package to the project location I want. I know I can rename the folder name in package explorer, but is there any way to automate this?

Or

Can I stop the default behavior of NuGet adding everything from Content to poject?
Mar 1, 2013 at 3:26 AM
There's no way to stop the default behavior of NuGet adding everything under Content.

That being said, you can put those files under the 'tools' folder (at the same location as your install.ps1) and in your .ps1 copy them to the project location.
Mar 1, 2013 at 3:42 AM
Thanks. But how can I stop the MVC website static files from being added the 'Content' folder when I am creating the package?
Mar 1, 2013 at 4:53 AM
Oops sorry, I didn't read your question carefully. AFAIK, there's no way to prevent the 'pack' command from adding all project files into the 'content' folder.