Monday, 15 April 2013

intellisense - RazorEngine 3.2.0: Razor Namespace not found in .cshtml File -



intellisense - RazorEngine 3.2.0: Razor Namespace not found in .cshtml File -

i'm using razorengine 3.2.0 in class library project.

i resolved class library related issues next following reply next so-question: razor intellisense error: feature 'extension method' cannot used because not part of iso-2 c# language specification

problem

i seek utilize @inherits keyword. if just write total qualified name view-class, intellisense works. if seek inherit razorengine.templating.templatebase<t> seems whole razorengine-assemlby isn't resolved.

the template looks this:

@inherits razorengine.templating.templatebase<viewmodels.printcatalogdata> <!doctype html> <html> <head> ...

at runtime works - intellisense failing.

question

what needed intellisense recognizes razorengine-assembly?

the @inherits not qualified name. seek adding namespace razorengine.templating web.config , remove qualified name view template.

<system.web.webpages.razor> <host factorytype="system.web.mvc.mvcwebrazorhostfactory, system.web.mvc, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <pages pagebasetype="system.web.mvc.webviewpage"> <namespaces> <add namespace="system.web.mvc" /> <add namespace="system.web.mvc.ajax" /> <add namespace="system.web.mvc.html" /> <add namespace="system.web.optimization"/> <add namespace="system.web.routing" /> <add namespace="assemblies"/> <add namespace="razorengine.templating"/> <add namespace="resources"/> </namespaces> </pages>

razor intellisense

No comments:

Post a Comment