Introduction

This is more of a maintenance issue than anything else. Often, you end up referencing open source / 3rd party assemblies – that need to be upgraded to newer versions. If your upgrade consists of a simple copy over the older version, chances are you will run into the following error (when you try to run your project).

The located assembly’s manifest definition does not match the assembly reference

There are two workarounds to this problem – and a third, long-term fix that will help avoid this problem in the first place.

Workaround 1 (Recommended)

Simply delete the assembly reference from your solution – and re-add a reference to the newer version. This will automatically update web.config elements to match the new the version of the assembly.

Workaround 2

The source of the problem is that web.config (or app.config) still contains an entry for the older version of your assembly. You can simply find this entry and delete it.

Long Term Fix (Avoiding the problem altogether)

Create a completely new , blank project (class library) – and add it to your solution. To this blank project, add all your 3rd party and open source assemblies. Now – you have them all in one place – inside a common project. Simply ‘project reference’ this common project from the other projects in the solution.

That’s it. Now – you simply keep this ‘common’ project upgraded with the latest version of the libraries. You will never encounter the above version mismatch again.

Anuj holds professional certifications in Google Cloud, AWS as well as certifications in Docker and App Performance Tools such as New Relic. He specializes in Cloud Security, Data Encryption and Container Technologies.

Initial Consultation

Anuj Varma – who has written posts on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.