Jun 26

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

I think you recognize this: you’re in the middle of developping software, everything runs smoothly and you progresses quickly. But suddenly this feeling of happiness stops when you see an error like this: Could not load file or assembly ‘Antlr3.Runtime’
or one of its dependencies. The parameter is incorrect. (Exception from
HRESULT: 0x80070057 (E_INVALIDARG)) Antlr3.Runtime

You have really no clue where to find, but one thing is for sure: it’s not in your code, because you didn’t changed anything.

It happened to me when developping an MVC 4 .net 4.5 webapp. After extensive search the solution is (as usual) simple:

empty your %TEMP% folder:

  • close all programs that you are using (the one in the system tray included)
  • Click the start button
  • click Run
  • type: %TEMP% in the box
  • click the OK button

Now a the directory for temporary files opens:

  • select all files ( CTRL – A)
  • press the DELETE key on your keyboard
  • acknowledge that you want to delete all files

Hopes it helps you to save a few yours of searching

CD