简体   繁体   English

安装VS2015后编译错误

[英]Compile errors after installing VS2015

I was working on VS2013 on a class library project that references MVC dll from the following location: 我正在从以下位置引用MVC dll的类库项目上使用VS2013:

C:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET MVC 4\\Assemblies\\System.Web.Mvc.dll C:\\ Program Files(x86)\\ Microsoft ASP.NET \\ ASP.NET MVC 4 \\ Assemblies \\ System.Web.Mvc.dll

Then I uninstalled VS2013 then installed VS2015. 然后我卸载了VS2013,然后安装了VS2015。 Now my project is demanding the MVC dll 现在我的项目要求使用MVC dll

在此处输入图片说明

Please note that the following path: C:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET MVC 4\\ 请注意以下路径:C:\\ Program Files(x86)\\ Microsoft ASP.NET \\ ASP.NET MVC 4 \\

is missing from my computer. 从我的计算机丢失。

The following compile error appears on build: 在编译时出现以下编译错误:

Severity Code Description Project File Line Error CS0234 The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) 严重性代码说明项目文件行错误CS0234类型或名称空间名称'Mvc'在名称空间'System.Web'中不存在(您是否缺少程序集引用?)

My guess would be that MVC4 was bundled together with visual studio 2013 and thus is also removed. 我的猜测是MVC4与Visual Studio 2013捆绑在一起,因此也被删除了。 You could try to reinstall it yourself using the web platform installer or removing the dependencies and re-adding them using nuget ( https://www.nuget.org/packages/Microsoft.AspNet.Mvc/4.0.40804 ) Install-Package Microsoft.AspNet.Mvc -Version 4.0.40804 你可以尝试使用自己重新安装web平台安装或删除的依赖和使用的NuGet重新添加他们( https://www.nuget.org/packages/Microsoft.AspNet.Mvc/4.0.40804Install-Package Microsoft.AspNet.Mvc -Version 4.0.40804

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM