Link to home
Start Free TrialLog in
Avatar of Star79
Star79Flag for United States of America

asked on

Could not load file or assembly 'WebMatrix.Data' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Hi

I am using Visual studio 2015 to build a MVC project and I am getting this error. Please provide some help in resolving it.

Could not load file or assembly 'WebMatrix.Data' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Thank you,
Ritesh
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

This error typically happens when you have different DLL versions in your PC.
Possible solutions:
1. Delete all files from bin folder then clean and rebuild the solution .
2.  Find the right assembly by putting it in the GAC or in the application path. For more info check :
https://blogs.msdn.microsoft.com/junfeng/2004/03/25/the-located-assemblys-manifest-definition-with-name-xxx-dll-does-not-match-the-assembly-reference/

If more help needed please post the full error message and your web.config (or other config file) that uses this assembly dll.
have you also tried to remove all the References of WebMatrix from your project and re-add it back?

when you re-add it back (perhaps via Nuget), make sure you add it with the correct version.

WebMatrix.Data
https://www.nuget.org/packages/WebMatrix.Data/
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.