0

I am using MVC 5, C#, .NET 4.5.1 in Visual Studio 2013. Following a Microsoft/Windows Update yesterday (15 October 2014) my program refuses to compile with multiple errors of the two types below:

The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' The type or namespace name 'ControllerContext' could not be found (are you missing a using directive or an assembly reference?)

I have tried this on a different computer (also with the patches) and had the same errors. The program in question is in production and compiled perfectly before the changes.

Before I start uninstalling and restoring the different patches, has anyone else seen this problem and is a solution/workaround known.

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Peter Smith
  • 5,528
  • 8
  • 51
  • 77
  • possible duplicate of [ASP.NET MVC security patch to version 3.0.0.1 breaks build](http://stackoverflow.com/questions/26406877/asp-net-mvc-security-patch-to-version-3-0-0-1-breaks-build) – Andrew Whitaker Oct 16 '14 at 17:17
  • I got the same error yesterday. I assumed it was something I had done. One of the projects in our solution had a reference to System.Web.Mvc 4.0.0.0 that could no longer be found. I updated that project using NuGet to System.Web.Mvc 5.2.0.0 and all was well. – Craig W. Oct 16 '14 at 17:21
  • Check dmatson's answer on http://stackoverflow.com/questions/26406804/after-windows-update-the-type-or-namespace-name-html-does-not-exist-in-the-na/26415093#26415093 – mattfei Oct 16 '14 at 23:38
  • @CraigW. Your solution worked perfectly. Please post as an answer if you want points. – Peter Smith Oct 17 '14 at 07:58
  • Craig W's solution resolved the problem with minimum changes elsewhere. Unless anyway has any good resons why not I propose to stay with that. The answer is not a duplicate. – Peter Smith Oct 17 '14 at 07:59

1 Answers1

1

I got the same error yesterday. I assumed it was something I had done. One of the projects in our solution had a reference to System.Web.Mvc 4.0.0.0 and it could no longer find it. I updated that project using NuGet to System.Web.Mvc 5.2.0.0 (which is what all the other projects in the solution were using anyway) and all was well.

Craig W.
  • 17,838
  • 6
  • 49
  • 82