Visualização MVC Razor vista Intellisense interrompida no VS 2013/2015/2017
Eu tenho um projeto existente escrito no VS2010 que, quando carregado no VS2010, funciona perfeitamente.
Quando carrego esse mesmo projeto no VS2013, as visualizações do MVC Razor contêm muitos erros, como se o arquivo de configuração estivesse ausente na pasta de visualizações.
Parece que não carregou o editor Razor corretamente usando os arquivos de configuração da pasta raiz e de visualizações e, em vez disso, gera erros como ...
The name 'model' does not exist in the current context
e ...
'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'LabelFor'
and no extension method 'LabelFor' accepting a first argument of type
'System.Web.WebPages.Html.HtmlHelper' could be found
(are you missing a using directive or an assembly reference?)
...
Alguma idéia do que poderia causar isso?
Editar: config arquivos conforme solicitado ....
Do arquivo principal web.config (nem todo, pois é muito grande para postar)
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Ninject" culture="neutral" publicKeyToken="c7192dc5380945e7" />
<bindingRedirect newVersion="3.0.0.0" oldVersion="0.0.0.0-3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.EnterpriseLibrary.Validation" culture="neutral" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect newVersion="5.0.505.0" oldVersion="0.0.0.0-5.0.505.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.ServiceLocation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Arquivo de configuração em "~ / Views /" ...
<?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" />
<add namespace="Emedia.Common.Mvc.Views.Helpers"/>
<add namespace="Emedia.Common.Mvc.Views.Extensions"/>
<add namespace="Emedia.Common.Utilities"/>
<add namespace="Emedia.Common.Utilities.Extensions"/>
<add namespace="Emedia.Common.Mvc.Controllers.Helpers"/>
<add namespace="Emedia.Resources.Service"/>
<add namespace="Emedia.Subscriber.Controllers"/>
<add namespace="Emedia.Subscriber.Controllers.ViewModels"/>
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>