Sunday, July 3, 2011

(HRESULT: 0x80070057 (E_INVALIDARG)) on debug

Issue:
When trying to debug an ASP.net website in Visual Studio you get the following error message:

Could not load file or assembly 'your project' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Solution:
Clear out the temporary framework files for your project in:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

Update:

For Windows 7, the path is:
C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\

For 64 bit systems with 'Framework' in the path the full path is:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

12 comments:

  1. Thanx for your valuable feedback... :)

    ReplyDelete
  2. Thank you, Can u explain why we get this error?

    ReplyDelete
  3. Thank you very much its working PERFECTLLY fine :)

    ReplyDelete
  4. Replies
    1. Thank you for your comment...

      Please share my blog.

      Thanks

      Delete
  5. The folder location suggested above is empty and I'm still getting this error. I have the .dll file copied to the application's bin\Debug folder.

    This is the error message I get when I run the application:

    DllNotFoundException was unhandled

    Unable to load DLL 'Toolkit.dll': The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    ReplyDelete
  6. My virtual machine crashed and I couldn't load my project (WebServices hosted in IIS), your solution worked just fine!! Thank you very much :)

    ReplyDelete