I have a project(class library) that uses the oracle data dll. The problem is that the projects that use it also use the oracle dll but the version isn't necessarily the same. The main projects also use the oracle dll so they need to match. The public API matches as far as I know so to get it to work I have multiple versions of the projects for each different dll. The oracle versions are totally different not just small changes.
To clarify, the class library uses the oracle dll and then the project that uses the library also uses the oracle dll so they need to match. There are different versions of the oracle dll and I want the class library to be able to use any of them because the API isn't different as far as the class library is concerned.
Is there a design flaw here or another way to get around it or will I have to have multiple versions? Is there a way to have the class library not coupled to the oracle dll version?
Thanks for the reply.
I was looking into codebase and it requires app.config. I am under the impression that class libraries don't have an app.config. Or am I configuring the class library from another project's app.config?
Class libraries also don't include the assemblies they depend on. They don't know where the final location or what the name of the .dll files will be that they need. Only the application knows all this, so naturally you have to configure the <codeBase> elements in the app.config of the application.
I added the info to the app.config but because that information is for runtime, it won't build. The error I get is :
I'm guessing it's not even looking at the app.config because it is just trying to compile.
I found something on SO with a similar problem. Link The class library in question is using .net 1.1 so the configuration is different and not sure if it even has a condition attribute for the references. Probably If I need to use the library again for higher .net versions I'll migrate it and have different build configurations for the different versions.
Doesn't really seem worth it at this point.
Ok it turns out that I was doing it wrong. What I did was I made the compiler happy by referencing the same oracle version as the dll. I put the correct oracle dll in the exe folder and had the codebase info in the app.config. I am assuming it works because the app was working fine. hehe
Working really well so far. If I move the app to a different computer with a different oracle client all have to do is change the version number in the app.config. so simple and easy!!!
thanks so much