This only happens in the Razor view.
The title says it all, I really have no idea what's going on. I clean up the code and it's all OK, but after a while the solution-wide analysis tells me there are errors again. The whole solution compiles just fine.
Don't know if it's a bug or I should set something up. I was working with Web Forms for a school project up until a while ago and moving onto MVC now, and this is really annoying.