In my razor views the intellisense is not working. Are there any fixes for this? I'm using the newly released VS 2012 Professional and building a ASP.NET MVC 4 project. The intellisense in my razor views are not working. Is there any fix for this?
ASP.NET MVC 4 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of the ASP.NET and the . NET framework. This new, fourth version of the framework focuses on making mobile web application development easier.
What helped me was to delete the .csproj.user file. Additionally, I have also deleted a who bunch of other things: packages, .suo file, bin/ and obj/, I also did devenv.exe /setup, and devenv.exe /resetsettings, but what helped, I think, was exactly that - deleting the .csproj.user file.
You might be experiencing issues which are covered in the "Known Issues and Breaking Changes" section when upgrading from MVC3 to MVC4 in this release notes post.
Follow the instructions in the "Installing ASP.NET MVC 4 breaks ASP.NET MVC 3 RTM applications" section to resolve the issue.
I just had the same problem when using RazorGenerator.Mvc on any project. Creating a brand new MVC4 project worked well untill RazorGenerator.Mvc entered into the game. It may well be that the cause is any other.
For me, checking that MVC4 project is using the latest version of MVC4 with NuGet is what solved it.
Go to the Package Administrator and search for MVC. You'll find that Microsoft's MVC4 has two available packages, one called "Microsoft ASP.NET MVC 4" and another called "ASP.NET MVC 4", and it happens to be that both have the same version number: 4.0.20710.0
One of them (the no-Microsoft one) says "Legacy package" but most likely that's the one your projects are using. Uninstall that one with NuGet on all your projects and install the "Microsoft ASP.NET MVC 4" package instead.
Close and reopen every cshtml view you have in the screen and then reopen some (you may have to wait for a minute or two for highlighting to show up). If in five minutes the syntax highlighting does not show up, close and reopen Visual Studio 2012.
(Tried with Visual Studio 2012 Premium)
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