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

Oct 30, 2007 at 9:04 PM

Please help me out here before I go postal. I have a web application where I'm using the data, exception handling, and logging blocks of the Enterprise Framework Library 3.1 and I can't identify what needs to be changed to fix the following error message that I'm receiving:

"An exception of type 'System.Configuration.ConfigurationErrorsException' occurred in Microsoft.Practices.EnterpriseLibrary.Data.DLL but was not handled in user code

Additional information: An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

I have recompiled all dll's; removed and re-included the references to the newly created dll's, and used the configuration tool to create the web.config file that also references the newly created dll's.

Thanks in advance
Nov 2, 2007 at 4:38 AM
You should really post this on the Enterprise Library project forum... this forum is for CodePlex, the site.

However, since I'm (fortunately?) more than familiar with this issue, I can tell you that's it's a classic Ref-Def mismatch from Fusion. The assembly you are looking for is not the assembly it found. Perhaps you have something wrong in the reference or perhaps Fusion is finding another assembly with the same name sooner.

The best way I've found to diagnose this is to run fuslogvw.exe, turn on logging and run it again. Fusion errors will show up in the log viewer, and you should be able to figure out what is going on.