I have a C# Console application which references Sybase.Data.AseClient
.
- dev machine has version 1.15.325 version of dll
- UAT has version 1.12.XYXZ
- Prod has version 1.15.115
I get the below exception on a machine similar to prod
ERROR 2010-11-11 18:18:23,562 15546ms FxSpotRateServer Main - Error System.TypeInitializationException: The type initializer for 'Sybase.Data.AseClient.AseConnection' threw an exception. ---> Sybase.Data.AseClient.AseException: Build number Mismatch - sybdrvado115a.dll. Expecting build number greater than or equal to '325'. Loaded build number 152. at Sybase.Data.AseClient.AseConnection.CheckVersion() at Sybase.Data.AseClient.AseConnection..cctor() --- End of inner exception stack trace --- at Sybase.Data.AseClient.AseConnection..ctor(String connectionString) at Applicationname.ClassName.GetAseConnectionString(String connectionString) in -------------------------------------------------------------------------------------------
I am thinking of doing having a runtime binding configured in my app.config and do this redirection on runtime.
Is there some other way/patterns to dynamically plug in these versions?
Is my approach clean and suggested?