5

Could not load file or assembly 'Antlr3.Runtime' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Am getting this error only in IIS.

Once after installed framework 4.5 VS 2012 express i got an exception using the MachineKeyCryptography. so I uninstalled 4.5 Framework and VS 2012 due to which this mess is happening.

Any help to solve this and make my application working is appreciated. Thanks

SharpC
  • 6,974
  • 4
  • 45
  • 40
  • 2
    Have a look at http://stackoverflow.com/questions/20180634/could-not-load-file-or-assembly-antlr3-runtime-1-or-one-of-its-dependencies – CinnamonBun Feb 10 '14 at 10:09
  • [I had the same issue and posted the answer in this link](http://stackoverflow.com/a/37328091/5002554) – Nick Bullatovci May 19 '16 at 15:44
  • Possible duplicate of [Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies](https://stackoverflow.com/questions/20180634/could-not-load-file-or-assembly-antlr3-runtime-1-or-one-of-its-dependencies) – Chris Moschini Nov 17 '17 at 14:54

6 Answers6

1

I had the same problem with a Web Forms Application based on .NET Framework 3.5. Deleting the bin and obj directories and re-building fixed the issue.

Marco Lackovic
  • 6,077
  • 7
  • 55
  • 56
0

I had the exact same issue when I upgraded my mvc4 project to mvc5. If you add the required reference file to your project references folder, it should sort it out.

0

If any solutions solve your problem verify the web.config, the version of assembly. works for me

<dependentAssembly>
        <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
      </dependentAssembly>
Daniel Melo
  • 548
  • 5
  • 12
0

I also encounter same issue, by entering %TEMP% in the File Explorer and delete all the temporary files, solved my issue.

immayankmodi
  • 8,210
  • 9
  • 38
  • 55
0

I'm on VS 2015 and am using an MVC project. I am using impersonation for testing and am impersonating a test user created in my company's AD. After trying a lot of different solutions to this problem, I made the test user an admin on my local box, and the problem went away. Not an ideal solution, but am able to test.

0

For me, the solution was to run Visual Studio as Administrator. It was apparently a permissions issue when starting debugging from Visual Studio.

Alexander van Trijffel
  • 2,916
  • 1
  • 29
  • 31