RSS

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

20 Feb

“System.IO.FileLoadException: Could not load file or assembly \”System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\” or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”:”System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″

Looking in my solution explorer I can see I have referenced System.Windows.Interactivity, Version=4.5.0.0
Windows.Interactivity
But why does he complaint that version 4.0.0.0 is not found. The short answer for the problem is that another referenced library references itself System.Windows.Interactivity with version 4.0.0.0. Therefore, because version 4.5.0.0 is loaded by the version 4.0.0.0 is not found.

The solution is to configure a assemblyBinding in app.config.

This is done as follows:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="System.Windows.Interactivity" 
                          publicKeyToken=31bf3856ad364e35"
                          culture=neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.5.0.0"
                         newVersion="4.5.0.0" />
    </dependentAssembly>
</assemblyBinding>
Advertisements
 
1 Comment

Posted by on February 20, 2014 in C-Sharp

 

One response to “The located assembly’s manifest definition does not match the assembly reference

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: