I'm having trouble getting Visual Studio to recognize the @model directive in MVC3. As a result, I'm not getting any Intellisense help. For example, I just loaded up the standard base MVC3 project in Visual Studio and it shows all sorts of errors in LogOn.cshtml since it can't figure out what the view model is. However, if I run the application everything works just fine. So I guess this is more of an annoyance than anything else.
If you have installed the ASP.NET MVC 3 Tools Update make sure you have set the webpages Version in your web.config:
<appSettings>
<add key="webpages:Version" value="1.0.0.0"/>
...
</appSettings>
Then simply close and reopen the view and syntax highlighting and Intellisense should come back.
UPDATE:
Reinstalling ASP.NET MVC 3 Tools Update solves the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With