我更新了我的MVC项目中所有的包,我得到了以下错误:
I updated all the packages of my MVC project and I got the following error:
无法加载文件或程序集Antlr3.Runtime,版本= 3.5.0.2, 文化=中性公钥= eb42632606e9261f'或之一其 依赖。找到的程序集清单定义不 匹配程序集引用。 (异常来自HRESULT:0x80131040)
Could not load file or assembly 'Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
用剃刀(.cshtml)文件开建项目给了我更多的错误。
Building the project with a razor (.cshtml) file open gave me more errors
推荐答案下面是我如何设法解决这个问题:
Here's how I managed to solve it:
转到解决方案资源管理,选择 ANTLR的参考下,右键单击,并说性能。确保文件版本是编译器正在寻找相同。就我而言,想要的MSBuild版本5.5.0.2,但引用属性显示较早的2.x版。
Go to the solution explorer and choose Antlr under References, right-click and say properties. Make sure the file version is the same the compiler is looking for. In my case, MSBuild wanted version 5.5.0.2, but the reference properties showed an earlier 2.x version.
我不得不这样做的是去包管理器控制台,输入:
All I had to do is go to the package manager console and type:
PM> update-package Antlr然后重新编译项目,并在情况下,你得到同样的错误更多的组件,更新它们。您的问题将得到解决。
Then build the project again, and in-case you get the same error for more assemblies, update them as well. Your issue will be resolved
更多推荐
集清单定义不匹配程序集引用
发布评论