asp.net-mvc-4bundleantlr3asp.net-optimizationbundling-and-minification

How to resolve Antlr3 dependency hell


I have a asp.net MVC 4 project with MEF and RavenBD.

When the project loads it throws this exception : Could not load file or assembly Antlr3.Runtime.dll

I have found that both RavenDB and WebGrease (installed with MVC 4) use Antlr3. But WebGrease comes with its own Antlr3 dll, signed by Microsoft - PublicKeyToken 31bf3856ad364e35

Antlr3 default PublicKeyToken is eb42632606e9261f.

RavenDB and WebGrease use the same version of Antlr3 3.3.1.7705

How can I resolve this problem?


Solution

  • Unfortunately I did not found a solution to conflicting dependencies of same version with different signatures.

    But the good news is that one of the contributors of WebGrease, Howard Dierking, has answered my concerns by email. Here's his response:

    Hi Maxime – sorry that you ran into this. I’m working to do a couple things to quickly resolve the issue:

    1) Preparing an update to the antlr package with the latest antlr version – will test and push to nuget.org

    2) Working with the WebGrease team to change their NuGet package so that it does not ship the antlr.dll but rather takes a package dependency – in talking with them, they were unaware that a package existed.

    This should resolve the dll hell issue that you ran into. Hopefully this won’t take more than a couple weeks with the holidays.

    Thanks,

    _howard