I have the following problem:
Razor syntax shows errors on view and won't autocomplete in most cases, for example:
@model someModel // The name 'model' does not exist in the current context
@Html.EditorFor(m=>m.SomeProp) // System.Web.WebPages.Html.HtmlHelper does not contain a defenition for 'EditorFor'.... same for .Partial and .OtherExtensions
//This do work:
@Html.CheckBox //.DropDown .Encode .Hidden ect... (The non extended properties of html)
What I've tried to far based on similar SO topics:
Make sure I have the same webpages / mvc version on the web.config in the main dir. and in the Views dir.
Unload the project, delete the .user file, reload project (that helped once though)
Rebuild/ clean/ delete the bin files
This is driving me crazy, please help!
added: Using Webpages 3.0.3XXX and MVC 5.2.3XXX
added #2: It seems it happen because the Views directory was separated to another project - don't do it! use the views in the same project as your mvc controllers.