Issues with Razor and Intellisense

I just started to convert few of their old ASP (?? yes) pages to Razor view engine with MVC 3.

 

Soon I ran into issues. I don’t have Intellisense….what !!! Nooooooooooooooooooo. I don’t want to go back to VB 4 days. After some research I found out the issue is not on the MVC 3 or the Razor view engine.

 

The problem lies in how you have your development machine setup and If you have Resharper.

 

Resharper don’t acknowledge the .cshtml extension and doesn’t provide intellisense support for you at the IDE. What a Jerk Smile

So if you are setup to use Resharper intellisense, you will run into this issue with Razor view engine.

 

You can use 2 quick ways to solve this.

 

1. inside the .cshtml file just use ctrl + space to manually fire the intellisense or

 

2. go to Resharper –> Options –> Select intellisense –> General

Change the option to use Visual studio intellisense.

 

Well there you go. This should fix most of my fellow developers intellisense issues.

 

Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *