I'm trying to use third party package for Bulk insert in entity framework: EntityFramework.BulkInsert
Problem is that my project uses Entity Framework mapping 5.0.0.9 and when I run 3rd party package I get an error:
Could not load file or assembly 'EntityFramework.MappingAPI, Version=5.0.0.6, Culture=neutral, PublicKeyToken=7ee2e825d201459e' or one of its dependencies.
On packages page it says that all versions between 5.0.0.6 and 6.0.0.0 are supported. So I guess I should just somehow change the version it uses, but I don't know how. Any suggestions?
You have to add a binding redirect to the web or app config file to tell the framework that when a lower version of the dependent assembly is required, it should load your desired version instead. It would be something like this:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework.MappingAPI" culture="neutral" publicKeyToken="7ee2e825d201459e" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.9" newVersion="5.0.0.9" />
</dependentAssembly>
</assemblyBinding>
</runtime>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With