问题描述
我有MEF和RavenBD一个asp.net MVC 4项目。
I have a asp.net MVC 4 project with MEF and RavenBD.
在项目加载它抛出这个异常:无法加载文件或程序Antlr3.Runtime.dll
When the project loads it throws this exception : Could not load file or assembly Antlr3.Runtime.dll
我已经发现,既RavenDB和WebGrease(与MVC 4安装)使用Antlr3。但是WebGrease本身自带的DLL Antlr3由微软签署 - 公钥31bf3856ad364e35
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默认公钥是eb42632606e9261f。
Antlr3 default PublicKeyToken is eb42632606e9261f.
RavenDB和WebGrease使用Antlr3 3.3.1.7705的同一版本
RavenDB and WebGrease use the same version of Antlr3 3.3.1.7705
我怎样才能解决这个问题呢?
How can I resolve this problem?
推荐答案
不幸的是我没有找到一个解决冲突的的相同版本的依赖与不同的签名。
Unfortunately I did not found a solution to conflicting dependencies of same version with different signatures.
但好消息是,WebGrease,霍华德Dierking的贡献者之一,已经回答了我的担忧通过电子邮件。下面是他的回答:
But the good news is that one of the contributors of WebGrease, Howard Dierking, has answered my concerns by email. Here's his response:
马克西姆嗨 - 对不起,你碰到了这一点。我正在做的一对夫妇
东西快速解决问题:
1)preparing更新到ANTLR包与最新ANTLR
版本 - 将测试并推向nuget.org
1) Preparing an update to the antlr package with the latest antlr version – will test and push to nuget.org
2)与WebGrease团队合作,以改变他们的NuGet包
因此,它不出货的antlr.dll而是需要一个包
依赖 - 在与他们交谈,他们不知道一个包
存在了。
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.
这应该解决您跑进DLL地狱问题。希望
这将不会超过几个星期更多的假期。
This should resolve the dll hell issue that you ran into. Hopefully this won’t take more than a couple weeks with the holidays.
谢谢,
_howard
这篇关于如何解决Antlr3依赖地狱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!