How to resolve Antlr3 dependency hell

柔情痞子 提交于 2019-12-09 14:36:45

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/13297402/how-to-resolve-antlr3-dependency-hell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!