DavidSpot Blog

Developer, super curious, a dog lover, sports fan and techie guy


Fixing "The located assembly's manifest definition does not match the assembly reference" error with assembly binding in web.config

When developing c# apps sometimes we import and use external dll's that may have dependencies from another dll's
When you do that you might encounter an error of type "The located assembly's manifest definition does not match the assembly reference". 

For instance, In a project I'm working for I had this error:



What this means is that the framework was looking for an assembly called WebGrease with a version 1.5.1.25624, but the version I have on my solution was 1.5.2.14234.



To fix this I added an assembly binding in web.config by forcing an old version to look for a new version (in my case the version 1.5.2.14.234 for the WebGrease dll) as you can see in the pic below:


Doing this fixed my problem:
 

Hope this helps someone :)