chhagan
chhagan

Reputation: 31

Visual studio successfully compiling MVC 4 project but controller shows some errors

I initially had built a project in visual studio 2008 with .net 3.5 & mvc 2. I migrated it to visual studio 2010 with .net 4 & mvc 4. My project runs successfully without any errors. But when I open one controller, it shows error. eg Its not able to detect the Request or HttpContext object properties within a controller, it goes RED when I say Request.IsAuthenticated or any Request or HttpContent properties. Error says IsAuthenticated is not defined. Funny part is it compiles & runs perfectly. Little weird because when I create a fresh project in MVC 4 it does show such error. It is definitely a project level setting which needs to change. Please help.

Upvotes: 3

Views: 230

Answers (1)

Steve Owen
Steve Owen

Reputation: 2071

Do you use Resharper? We've had the same problem with it, with the first release of v7 not having this bug, but all others up to 7.1.1 suffering from it. If so, try and upgrade to see if it helps.

Otherwise Jetbrains claim clicking on Resharper | Options | Clear caches should help (although it didn't for us).

Upvotes: 1

Related Questions