Dynamically bind MySqlData.dll: snippet

from the Artful MySQL Tips List


Example: to make an app compatible with Connector/NET 5.0.6 and 5.0,.7, add this to the config.file...

<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?xml&nbsp;version</span><span style="color: #007700">=</span><span style="color: #DD0000">"1.0"</span><span style="color: #0000BB">?&gt;</span>
</span>
</code>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" />
        <bindingRedirect oldVersion="5.0.6.0" newVersion="5.0.7.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>




Return to the Artful MySQL Tips page