Visual Studio 2013 C# Web Project builds but IDE reports The type or namespace name xxx could not be found error

后端 未结 10 2174
攒了一身酷
攒了一身酷 2020-12-04 16:56

When opening an MVC4 C# web project in Visual Studio 2013, the IDE reports the error \"The type or namespace name \'_\' could not be found (are you missing a using

10条回答
  •  抹茶落季
    2020-12-04 17:34

    Microsoft just released a new security update to be automatically applied to machines configured to use Microsoft Update.

    Unfortunately, some ASP.NET MVC 3 and 4 VS projects can no longer build after the update is applied. These projects will fail with the following error:

    "Could not locate the assembly "System.Web.Mvc,Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL"

    My project also had the error "The type or namespace name 'System.Web.Mvc' could not be found (are you missing a using directive or an assembly reference)". Installing the latest version of Microsoft.AspNet.Mvc solved my problem. See the following article from Microsoft for more info:

    http://blogs.msdn.com/b/webdev/archive/2014/10/16/microsoft-asp-net-mvc-security-update-broke-my-build.aspx

提交回复
热议问题