I once watched a TekPub video on MVC2 that suggested renaming Content folder as Public, Adding Scripts to this folder etc.
A couple of developers I am showing MVC preferred this structure and tried it. However with the inclusion of NuGet it seems to expect the folders to be in the standard locations. E.g. JQuery I think just puts itself in \Scripts folder. Guess that is convention over configuration.
Is there anyway to restructure the default folders but explain to NuGet where to put things? Is it just a bad idea to change the default layout?
The issue is that currently, when you create a package, you specify in the .nuspec file the path that the file will ultimately end up at. So right now, things are pretty much hard-coded to go to /Content.
We've actually discussed adding the ability to specify virtual folders or placeholders in your .nuspec file. Then the end-user can define a mapping to say all $scripts files go to /public/js, etc.
You can see the discussion here http://nuget.codeplex.com/discussions/256542
We can create an issue for this and get people to vote it up.
There is no way for Nuget to know where you randomly decided to put stuff. It can't read your mind, and without some kind of configuration, which Nuget doesn't really have for this sort of thing, it simply isn't possible.
This is why you should stick to conventions, because doing so saves you a lot of work if you are ever going to need to utilize third party tools.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With