In ASP.NET MVC 4.5.2 Framework.
after typing
@Html.LabelFor()
or
@Html.EditorFor()
in view
I\'m getting Error: The
Well, I got it fixed by correcting the assembly reference in /Views/web.config, see the image:
In my case the solution was to move the ConnectionString inside the Web.Config. This statement should be after AppSettings section.
If you get this in only one or two CSHTML files... it's a corrupt file.
I've had this happen with a corrupt file that has some hidden unicode characters. Try copying all the text of the document to a fresh notepad instance. Clear the contents of the original file and save... if the file length is > 0, there's something awry.
Delete the file and save your notepad instance over the old version. All the errors went away for me.
I've had this happen a couple of times in my solution. Not sure what's causing it, but I suspect it's Resharper screwing up when it starts to swallow huge chunks of memory into the abyss.
Am I the only one who has a love / hate relationship with Resharper?