asp.net mvc - Razor Editor not working for some projects in solution -
i creating cms using mvc 4 , razor syntax , have unusual problem. in main project working fine, have additional projects in solution (also mvc 4 projects) extensions main project (loaded @ runtime) have own views/layouts.
now in these additional projects razor editor eighter highlight should, underlining missing (like html helper) or not work @ all: or
does have thought why? files open razor editor via "open with..." shure razor editor used.
just add together dummy web.config
file root of class library next contents in order fool visual studuio's intellisense in razor files (taken this blog post
):
<?xml version="1.0"?> <configuration> <configsections> <sectiongroup name="system.web.webpages.razor" type="system.web.webpages.razor.configuration.razorwebsectiongroup, system.web.webpages.razor, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <section name="host" type="system.web.webpages.razor.configuration.hostsection, system.web.webpages.razor, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" /> <section name="pages" type="system.web.webpages.razor.configuration.razorpagessection, system.web.webpages.razor, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" /> </sectiongroup> </configsections> <system.web.webpages.razor> <host factorytype="system.web.mvc.mvcwebrazorhostfactory, system.web.mvc, version=3.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.routing" /> </namespaces> </pages> </system.web.webpages.razor> <system.web> <compilation targetframework="4.0"> <assemblies> <add assembly="system.web.abstractions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"/> <add assembly="system.web.routing, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"/> <add assembly="system.data.linq, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"/> <add assembly="system.web.mvc, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> </assemblies> </compilation> </system.web> </configuration>
asp.net-mvc razor asp.net-mvc-4 visual-studio-2012
No comments:
Post a Comment