After yesterday\'s Windows Update, I seem to have issues building my projects.
Related Windows Updates could be:
ASP.NET MVC 2.0: KB2993939
ASP.NET MVC 3.0:
We have the same problem.
Microsoft changed the Version from 3.0.0.0 to 3.0.0.1
I guess this is the reason Visual Studio can't find the reference, because the regular setting is "Use specific version - true".
In my case i can't change the setting to false, because I am using Mvc4 on the same machine and it would automatically use the version 4 dll.
A solution is to remove the project reference of System.Web.Mvc.dll and add it again. Then VS will use the Version-3.0.0.1-DLL as a reference.
I have same problem today after windows update. There is my solution.
Install-Package Microsoft.AspNet.Mvc -Version 5.2.0.0 -Project PROJECTNAME
Also you can try use these code maybe it helps.
Uninstall-Package Microsoft.AspNet.Mvc -Force
Goodluck.
The recent updates have incremented version numbers
3.0.0.0 -> 3.0.0.1 and 4.0.0.0 -> 4.0.0.1
I had to remove the reference and re-add (System.Web.Mvc is found in Assemblies >Extensions are of the Add Reference dialogue)
Reinstall the MVC assembly
download link : http://www.microsoft.com/en-US/download/details.aspx?id=30683
I had same issue recently.
After Windows Update - my project in Visual Studio suddenly had 500+ errors - all related to system.web.mvc
So I deleted the reference and re-added it - found in C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies
Great - project compiles.
Put it on site - get "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information"
After much messing around, I went to site, downloaded the version of it off there - referenced it - it worked on my laptop AND on site
phew!!!!!!!
As the patch has incremented the version number has risen from (for MVC4 it has risen from 4.0.0.0 to 4.0.0.1) the Reference Path in the project files needs to change from:
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\bin\System.Web.Mvc.dll</HintPath>
</Reference>
to
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\System.Web.Mvc.dll</HintPath>
</Reference>
Obviously adjust the hint path as appropriate, and make similar changes for other versions of MVC