Asp.net error Could not load file or assembly [dup

2019-04-04 04:02发布

问题:

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

  1. Clean asp.net temp files
  2. Reinstall .net framework

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?

回答1:

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\