加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc-4 – 如何解决Antlr3依赖地狱

发布时间:2020-12-16 00:25:09 所属栏目:asp.Net 来源:网络整理
导读:我有一个asp.net MVC 4项目与MEF和RavenBD。 项目加载时会抛出此异常:无法加载文件或程序集Antlr3.Runtime.dll 我发现RavenDB和WebGrease(与MVC 4一起安装)都使用Antlr3。但WebGrease自带的Antlr3 dll,由Microsoft签署 – PublicKeyToken 31bf3856ad364e35
我有一个asp.net MVC 4项目与MEF和RavenBD。

项目加载时会抛出此异常:无法加载文件或程序集Antlr3.Runtime.dll

我发现RavenDB和WebGrease(与MVC 4一起安装)都使用Antlr3。但WebGrease自带的Antlr3 dll,由Microsoft签署 – PublicKeyToken 31bf3856ad364e35

Antlr3默认PublicKeyToken是eb42632606e9261f。

RavenDB和WebGrease使用相同版本的Antlr3 3.3.1.7705

如何解决这个问题?

解决方法

不幸的是,我没有找到与不同签名相同版本的冲突相依性的解决方案。

但好消息是,WebGrease的贡献者之一Howard Dierking通过电子邮件回答了我的疑虑。这是他的回应:

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读