Visual Studio的2015年新的MVC项目 - MVC中不存在Microsoft.Aspnet [英] Visual Studio 2015 New MVC Project - the mvc does not exist in Microsoft.Aspnet
问题描述
即时得到错误在Visual Studio 2015年
我使用的是Windows 8.1和Visual Studio 2013和asp.net MVC 5的所有项目都是工作,没有任何错误发展精细。
由于我安装了Windows 10和Visual Studio 2015年我的整个ASP.NET MVC 5项目不工作很好。
我在Visual Studio 2015年创建新的默认模板进行检查。我得到了在这些新项目也同样的错误。
我得到的错误是:
CS0234类型或命名空间名称的mvc'中不存在
命名空间Microsoft.AspNet(是否缺少程序集引用?)
块引用>和
布局犯规存在于当前上下文的名称。
块引用>事情我已经尝试:
- 修复VS 2015年。
- 卸载并安装安装封装Microsoft.AspNet.Mvc从的NuGet
- 复制本地=真
- System.web.MVC已经被引用。
- Corrent版本在web.config中所有的地方5.2.3.0
解决方案我跟着顺序执行这些步骤彻底的重新安装的Visual Studio 2015而解决了这个问题。维修没有工作
运行命令
C:\\ Program Files文件(x86)的\\微软的Visual Studio
14.0 \\ Common7 \\ IDE \\ devenv.exe的/ resetuserdata P>
块引用>下载web安装程序安装文件,并在下载目录中运行以下命令
vs_community.exe /卸载/力
块引用>卸载我确信相关VS没有文件的软件安装并重新启动电脑后
- 已安装使用Web安装新的Visual Studio。
再次运行命令。
C:\\ Program Files文件(x86)的\\微软的Visual Studio
14.0 \\ Common7 \\ IDE \\ devenv.exe的/ resetuserdata P>
块引用>更新是可在Visual Studio中,安装他们 - 而重新启动的Visual Studio
现在打开它需要时间虽然开始,但它的工作原理之后的任何asp.net mvc的解决方案。
Im getting error in Visual studio 2015 I was using windows 8.1 and visual studio 2013 and all projects with asp.net MVC 5 were working and developing fine without any error.
Since i installed windows 10 and visual studio 2015 my whole ASP.NET MVC 5 project doesnt work well.
I created new default template in visual studio 2015 to check them. I got the same error in those new project also.
I get errors as :
CS0234 The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?)
And
The name "Layout" doesnt exist in current context.
Things I have already Tried :
- Repaired VS 2015.
- Uninstalled and installed Install-Package Microsoft.AspNet.Mvc from Nuget
- Copy Local = True
- System.web.MVC already referenced.
- Corrent Version in web.config all places 5.2.3.0
解决方案I followed these steps in order to completely re-install Visual Studio 2015 which solved the problem. Repair didnt work
run the command
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /resetuserdata
Downloaded the web installer setup file and run the following command in the downloaded directory
vs_community.exe /uninstall /force
After Uninstalling i made sure no file software related to VS is installed and restarted PC
- Installed new Visual Studio using Web Installer.
Run the command again.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /resetuserdata
Updates were available inside Visual Studio , installed them - Restarted Visual Studio
Now open any asp.net mvc solution it takes time though in start but after that it works.
这篇关于Visual Studio的2015年新的MVC项目 - MVC中不存在Microsoft.Aspnet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!