I've got an app that is built with ODP.NET 2.111.6.20 - all the references in VS are set Specific Version to false, but when I try to run the app on a ma开发者_运维问答chine that only has 2.111.6.0, it throws an error saying it can't find the 2.111.6.20 assembly. How can I get my app to run with any version of ODP.NET 2.111?
I suppose the assembly is strongly signed, so you get the exception. You could use binding redirect in your app.config file:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ODP.NET"
publicKeyToken="PUT THE PUBLIC TOKEN HERE"
culture="neutral" />
<bindingRedirect oldVersion="2.111.6.20"
newVersion="2.111.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
精彩评论