Reputation: 915
I am writing a c# WinForms application. I reference a 3rd Party dll (SDK) to perform specific tasks. I expect this dll to be installed on clients machine.
Now, if I use say Version 1 as reference , and client has Version 1 installed. The application works.
Later, if the client has upgraded to Version 2, my application wont work because, there is no more Version 1 dll.
How do I code my application? One for each version of the 3rd party dll? or is there a better way? (SDK is backward compatible)
Upvotes: 0
Views: 548
Reputation: 11216
You can add an assembly binding redirect to app.config. Something like this:
<dependentAssembly>
<assemblyIdentity name="someAssembly"
publicKeyToken="32ab4ba45e0a69a1"
culture="en-us" />
<bindingRedirect oldVersion="7.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
See this link
Upvotes: 4