c# - Razor syntax broken on MVC 5 views VS2013 -


i have following problem:

razor syntax shows errors on view , won't autocomplete in cases, example:

@model somemodel // name 'model' not exist in current context  @html.editorfor(m=>m.someprop) // system.web.webpages.html.htmlhelper not contain defenition 'editorfor'.... same .partial ,  .otherextensions  //this work: @html.checkbox //.dropdown .encode .hidden ect... (the non extended properties of html) 

what i've tried far based on similar topics:

  1. make sure have same webpages / mvc version on web.config in main dir. , in views dir.

  2. unload project, delete .user file, reload project (that helped once though)

  3. rebuild/ clean/ delete bin files

this driving me crazy, please help!

added: using webpages 3.0.3xxx , mvc 5.2.3xxx

added #2: seems happen because views directory separated project - don't it! use views in same project mvc controllers.

the mvc architecture looks views in following folders

~/views/controllername/actionname.[cshtml|vbhtml|aspx|ascx]

or

~/views/shared/actionname.[cshtml|vbhtml|aspx|ascx]

secondly, can specify per this article. though never tried myself.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -