I'm trying to get a first Razor template working with Nancy, and the first line of my .cshtml...
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
gives me 3 build errors including the following...
'NancyContext' does not contain a definition for 'ApplicationInstance' and no extension method 'ApplicationInstance' accepting a first argument of type 'NancyContext' could be found (are you missing a using directive or an assembly reference?)
One very weird thing is that I have three "errors", but they're not stopping the build. They show in the Error list, the classes are underlined in red in the Solution explorer but not in the code window. Don't believe me ? Screenshot follows...
Update
I've fixed the first two errors by adding explicit references to System.Web.Helpers and System.Web.WebPages. The remaining error, 'NancyContext' does not contain a definition for 'ApplicationInstance', is still bugging me. ApplicationInstance is a type in System.Web, for which I have a reference. If I delete the System.Web reference the project still builds. If I add the reference I still have the error.