When you can’t seem to fix “The located assembly’s manifest definition does not match the assembly reference”

September 5, 2009 2 Comments

I’ve dealt with this one a few times. You get the .net error:

Could not load file or assembly ‘MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference.

So immediately you start moving DLL’s around, trying to find the one that’s out of date. Usually this means you compiled referencing a newer version of some assembly, and neglected to get that new DLL to your website’s bin folder. But then after pouring over that folder, you find the error is not gone – why can this be! Much hair pulled out…

Then it dawns on me, and I’ve done this one before. Often times I push serializable objects into the session. And so, when the wrong DLL was in there, an old version of object X got pushed into the session. Now that the correct DLL’s are in place, when .net tries to deserialize the object, the versions don’t line up. All I have to do now is close out my browser and reopen the site. Log in again and we’re back in business. Don’t you hate it when something so simple wastes so much time?! Hopefully in the future I will remember this blog post.

* News, .NET Programming
2 Comments to “When you can’t seem to fix “The located assembly’s manifest definition does not match the assembly reference””
  1. Sarin says:

    I can’t believe it was so simple!
    I’m trying to test a complex assembly binding redirect scenario and was dumbfounded by “The located assembly‚Äôs manifest definition does not match the assembly reference.”

    Thanks

  2. sami says:

    You can remove all references in the bin folder, and add them again :-)

Leave a Reply

You must be logged in to post a comment.

How to import contacts from a CSV file in Outlook 2003

In outlook 2003, go to File >> Import and Export… Select ‘Import from another program or file’ Select Comma...

Are you backing up your data?

Most people know they should back up their data, but not everyone does. If you’re one of those people,...

5 Easy Choices For a Better Website.

Are you planning to design or redesign your website soon? If so, then here are a few tips that...

How to enable site maps in Waypoint

Sitemaps are simple XML files that Google and other search engines use to find the content in your website....

5 reasons you should learn how to use HTML

HTML is the backbone of everything online. Everyone should know how to read it and write it! OK, well...

How to Link Facebook to Twitter

Posting to Facebook, LinkedIn, Twitter and other social media sites is a great way to interact with your customers....

Visual Studio Environment Tips

This week I had to send my iMac in for repair. Normally I program using Windows Server 2008 running...

Fixing IIS7 Maximum Upload Size

If you have your Waypoint site hosted with Twin Harbor and you need to increase the maximum file upload...

What is an SSL Certificate?

You may have heard about SSL Certificates, also called secure certificates, or SSL Certs for short. But what are...

OSX Lion Removes Functionality

In my previous post I thought I had found a way to maintain some of the functionality that we...