24

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

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Carlos Balbuena
  • 781
  • 1
  • 5
  • 6
  • 4
    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 , thanks – Iman Jul 05 '11 at 09:30
  • 1
    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 Jul 31 '12 at 20:14

2 Answers2

54

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

DeepSpace101
  • 13,110
  • 9
  • 77
  • 127
Carlos Balbuena
  • 781
  • 1
  • 5
  • 6
  • 7
    In my case (Win vista), also excludes the contents of the folder C:\Users\{user_name}\AppData\Local\Temp\Temporary ASP.NET Files\ – bodee Jul 11 '11 at 16:19
  • This also fixed this issue for me for all of the Googlers out there: Could not load file or assembly 'AjaxMin' or one of its dependencies. The parameter is incorrect. – Jon Kragh Jan 12 '12 at 13:02
  • This is the definitive answer because it mentions the 64-bit directories, which most of the top internet searches don't mention. – Rob Cannon Mar 21 '12 at 13:06
  • Thanks a ton! This was making me go insane! – Garrett Fogerlie Dec 15 '12 at 11:01
3

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
user984899
  • 31
  • 3