2

Today I woke up after a windows update last night, and my MVC project was broken (many missing namespace errors). Apparently, my System.Web.Mvc version was updated from 4.0.0.0 to 4.0.0.1 automatically and my project references were broken, see: Windows update caused MVC3 and MVC4 stop working

Following some threads, I went through my entire project and renamed references from 4.0.0.0 to 4.0.0.1, this resolved the errors, however now I am getting the following error:

Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'Html' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)

Source Error:

Line 36: <add namespace="System.Web.Mvc"/>
Line 37: <add namespace="System.Web.Mvc.Ajax"/>
Line 38: <add namespace="System.Web.Mvc.Html"/>
Line 39: <add namespace="System.Web.Optimization"/>
Line 40: <add namespace="System.Web.Routing"/>

I am a bit stumped as to what to do about this. Any ideas?

Community
  • 1
  • 1
edencorbin
  • 2,569
  • 5
  • 29
  • 44

1 Answers1

2

So I resolved my own issue,

First I changed all references to System.Web.Mvc from 4.0.0.0 to 4.0.0.1,

Then I had to go to the properties of System.Web.Mvc (possibly because I had removed and re-added it) and change copy local to true.

edencorbin
  • 2,569
  • 5
  • 29
  • 44
  • 1
    I just deleted my System.Web.Mvc reference, added it back in from Extensions (v4.0.0.1), and set copy local to true. Clean, rebuild, good as new. – CSJ Oct 18 '14 at 00:29