24
votes

I was working normally but now i'm getting this error:

Could not load file or assembly 'App_Licenses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

I have researched for answers on the web but i cant find any specific help.

I clean all my asp .net temporary files, rebuild the solution but nothing seems to work.

Thanks in Advance

2
for me this error was Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) and deleting Framework*v4.0.30319*\Temporary ASP.NET Files solved the problem , thanksIman
I got this error for several different libraries, including internal ones. Seems to work for them too. As a note: it happened to me when my computer suddenly lost power while building. Probably has to do with corrupted temp files.mtmurdock

2 Answers

54
votes

I have solved my problem deleting my temporary files in both .net frameworks folders

C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

For 64bit systems, also check the same under the Framework*64* folders i.e.

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

Greetings

3
votes

As a developer, I've had to run this a few times, so I created an automated script. Create a bat or cmd file with the following. You can then run this on startup / shutdown / whenever you want to clear free space.

  • DEL /Q /S /F %tmp%
  • DEL /Q /S /F "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files"
  • DEL /Q /S /F "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files"
  • DEL /Q /S /F "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"
  • DEL /Q /S /F "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files"
  • DEL /Q /S /F "C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files"
  • PAUSE