Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 791
W3Max Avatar asked Nov 08 '12 20:11

W3Max


2 Answers

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

like image 100
W3Max Avatar answered Oct 13 '22 02:10

W3Max


I had the same problem and solve it by deleting all the project from my computer, getting the latest version from the server and rebuilding all the nuget dependencies after the project loaded. You can try this, it worked for me.

It seems that some nuget dependencies leave some trash behind after being uninstalled and that's the only way to make a clean rebuild for all the solution

like image 44
user3559993 Avatar answered Oct 13 '22 03:10

user3559993