29

My computer blue screened. After my computer restarted, I ran my Silverlight application and got this error:

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

I actually got a couple of errors regarding RIA services not being able to generate code because a directory name had invalid characters. I cleared that up by deleting everything in the bin and obj directories. Clearly there is something corrupt.

I've pulled the DLL back down and set it to copy local and I still get that error, only after I run the program. I'm not sure if it's something where the DLL is corrupt in the GAC or something like that.

EDIT: After reinstalling the Async CTP DLL and checking the GAC, I decided to turn on Assembly Binding logging which gave me this information (along with a lot more).

ERR: Failed to complete setup of assembly (hr = 0x80070057). Probing terminated.

5
  • Did you install the VS 2010 SP1 Beta? If so, it's incompatible with the Async CTP (which provides that assembly). You'll have to either uninstall SP1 beta or the Async CTP. Feb 12, 2011 at 0:39
  • No I have VS 2010 Ultimate. The Async CTP worked just fine before the crash. Feb 12, 2011 at 0:42
  • I would recommend repairing Visual Studio, in that case. Feb 12, 2011 at 0:55
  • You should sort out the problem which caused your bluescreen, then reinstall Windows. Sounds insane, but if your computer is faulty, things like this can and do happen. Feb 12, 2011 at 5:45
  • I reinstalled the AsyncCTP and I still get the same error. Does anyone know how to turn on Assembly Binding Logging so I can see the real error? Feb 13, 2011 at 23:43

5 Answers 5

35

Okay, so I figured it out. I had to delete everything in this directory: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\

6
  • 6
    Comment by Jaider (rejected edit): Also clear the files at: C:/Users[username]/AppData/Local/Temp/Temporary ASP.NET Files/. This is to complement your answer, based on this website. Was very helpful to me.
    – Anne
    Dec 12, 2011 at 22:19
  • 1
    +1 I got a similar error with .Net 3.5 (same error code), and deleting everything in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files fixed it. Thanks for the tip!
    – Polyfun
    Jan 5, 2012 at 10:21
  • 4
    It is really so Strange but on my windows 7 (x64) pc i had to delete files in "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\" NOT Framework64, By the way thanks a lot you just saved my life.
    – NET3
    Oct 2, 2012 at 17:30
  • 2
    For my C:\Users\loggedinuser\AppData\Local\Temp\Temporary ASP.NET Files\ EVERYTHING Jan 28, 2013 at 4:27
  • 1
    +1 can confirm this works with solution containing Winform, ExcelVSTOAddIn & ClassLibraryAPI. Simply delete all files in C:\Users\loggedinUser\AppData\Local\Temp May 20, 2013 at 4:59
19

Delete all files from the following folders and try again:

C:\Users[username]\AppData\Local\Temp\Temporary ASP.NET Files\

.NET 4.0

%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\ %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\

.NET 2.0

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ %SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

1

Have you tried starting devenv in safemode?

devenv.exe /SafeMode

If this works you can try resetting the settings files to:

devenv.exe /ResetSettings

Instead of repairing Visual Studio you reset the user data back to their defaults with:

devenv.exe /resetuserdata
0
0

If you think your GAC has become corrupted, I suppose you could take a look at the DLL in there. I bet you could find a checksum for the dll online, or re-download it. I'd follow Reed's advice, though -- that seems more likely to treat the root issue.

0
-1

Simply delete temporary file in Temporary folder. enter %temp% in Run command to open temp folder and then delete all file and folder. After this your problem will resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.