I'm working on a CSS framework that I can drop in to other projects as a NuGet package.
To keep things clean, the entire framework - views, styles, images, and master pages / layout pages - is actually stored under ~/CssThing/
Works perfectly with the WebForms view engine, but when I move the _layout.cshtml file into ~/CssThing/ and then modify my Razor page to say:
@{
Layout = "~/CssThing/_layout.cshtml";
}
it starts complaining that ViewBag is not defined, or that The name 'Url' does not exist in the current context
, or various other bits of weirdness that suggest the view is no longer inheriting from the proper base class.
How can I get this to work?
NOTE: The reason everything's split out like this is there's no way to force NuGet to overwrite existing code, and there's no way to spin up an empty MVC3 web application without picking up all the jQuery, etc. references, so rather than risk my framework getting half-deployed because half the files were already present, I'm keeping everything completely seperate.