The name 'model' does not exist in current context in MVC3

后端 未结 20 2174
-上瘾入骨i
-上瘾入骨i 2020-11-29 02:53

I added a cshtml page in an project. When I tried to add the following declaration to it, I get an error: \"The name \'model\' does not exist in current context\".



        
20条回答
  •  [愿得一人]
    2020-11-29 03:00

    I ran into this same problem, but in my case, the only thing that had changed is that I had uninstalled Visual Studio 2012 and installed Visual Studio 2013. I opened up our solution, but I kept getting the same The name 'model' does not exist in current context error in every Razor view.

    My coworker suggested checking for updates for VS2013. After I installed the VS2013 Update 1, I stopped getting this error.

提交回复
热议问题