asp.net-mvc-views

Mvc View (The name *** does not exist in the current context)


Just out of curiosity. Even though my code is perfectly compiling yet I am getting a red line under sections that uses c# in the cshtml view. Once I hover over it I get (The name *** does not exist in the current context) Any Ideas? Note: all references are added that's not the problem


Solution

  • I have that happen to me a few times already. Try to remove the reference in the project and add it again, that should fix it.