Visual Studio的2015年新的MVC项目 - MVC中不存在Microsoft.Aspnet [英] Visual Studio 2015 New MVC Project - the mvc does not exist in Microsoft.Aspnet

查看:489
本文介绍了Visual Studio的2015年新的MVC项目 - MVC中不存在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(是否缺少程序集引用?)



  

布局犯规存在于当前上下文的名称。


事情我已经尝试:


  1. 修复VS 2015年。

  2. 卸载并安装安装封装Microsoft.AspNet.Mvc从的NuGet

  3. 复制本地=真

  4. System.web.MVC已经被引用。

  5. Corrent版本在web.config中所有的地方5.2.3.0


解决方案

我跟着顺序执行这些步骤彻底的重新安装的Visual Studio 2015而解决了这个问题。维修没有工作


  1. 运行命令


      

    C:\\ Program Files文件(x86)的\\微软的Visual Studio
      14.0 \\ Common7 \\ IDE \\ devenv.exe的/ resetuserdata


  2. 下载web安装程序安装文件,并在下载目录中运行以下命令


      

    vs_community.exe /卸载/力



  3. 卸载我确信相关VS没有文件的软件安装并重新启动电脑后


  4. 已安装使用Web安装新的Visual Studio。

  5. 再次运行命令。


      

    C:\\ Program Files文件(x86)的\\微软的Visual Studio
      14.0 \\ Common7 \\ IDE \\ devenv.exe的/ resetuserdata


  6. 更​​新是可在Visual Studio中,安装他们 - 而重新启动的Visual Studio


  7. 现在打开它需要时间虽然开始,但它的工作原理之后的任何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 :

  1. Repaired VS 2015.
  2. Uninstalled and installed Install-Package Microsoft.AspNet.Mvc from Nuget
  3. Copy Local = True
  4. System.web.MVC already referenced.
  5. 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

  1. run the command

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /resetuserdata

  2. Downloaded the web installer setup file and run the following command in the downloaded directory

    vs_community.exe /uninstall /force

  3. After Uninstalling i made sure no file software related to VS is installed and restarted PC

  4. Installed new Visual Studio using Web Installer.
  5. Run the command again.

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /resetuserdata

  6. Updates were available inside Visual Studio , installed them - Restarted Visual Studio

  7. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆