Possible Duplicate:
After a computer crash my Visual Studio 2010 will not load an assembly
I have a web application in Asp.net MVC 3 developed in VS 2010. Today while working my laptop got rebooted due to some reason and from that time onward when I run my app from VS it gives me error
Could not load file or assembly 'Microsoft.Web.Mvc.AspNet4' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
On googling I found few solutions
I tried first solution but it didn't work. Before I try second solution I would like to know if there is any other alternative to fix this problem?
Http 5.2. 0.0? In summary if you get the "Could not load file or assembly error", this means that either your projects or their references were built with a reference to a specific version of an assembly which is missing from your bin directory or GAC.
There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.
Restart Visual Studio, clean and build a solution. Remove the class library references and add it again. Tools > Import and Export Settings Wizard > Reset all settings (maybe some setting was not well configured).
Delete all files from the following folders and try again:
C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With