Assembly manifest definition does not match assembly reference

I updated all the packages of my MVC project and received the following error:

Failed to load file or assembly 'Antlr3.Runtime, Version = 3.5.0.2, Culture = neutral, PublicKeyToken = eb42632606e9261f' or one of its dependencies. The installed assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Building a project with an open razor file (.cshtml) gave me more errors

+10
asp.net-mvc-5 nuget antlr3
Jan 07 '14 at
source share
3 answers

Here's how I managed to solve it:

Go to the solution explorer and select Antlr in the Links section, right-click and say properties. Make sure the version of the file matches what the compiler is looking for. In my case, MSBuild wanted version 5.5.0.2, but the reference properties showed an earlier version 2.x.

All I had to do was go to the package manager console and type:

 PM> update-package Antlr 

Then create the project again, and if you get the same error for more assemblies, update them. Your problem will be resolved.

+28
Jan 07 '14 at
source share

I had the same error with my MVC 5 application. Tried everything,

  • Install and reinstall Antlr packages
  • Deleting% TEMP% data.

Fianlly, I was able to solve the problem by simply deleting all the DLLs from my project bin folder and creating the project again. Although I'm still not sure what the real reason for this reference error is.

+1
Mar 28 '16 at 7:16
source share

I tried the above solution to update a specific package, but it was unsuccessful, but updating all the packages really worked. Using the package manager console ;

 update-package -Reinstall 

The rest of the solution follows.

0
Feb 06 '18 at 16:20
source share



All Articles