Multiple versions of OraDirect.NET on buildserver

Multiple versions of OraDirect.NET on buildserver

Postby vmakkenz » Tue 26 Aug 2008 13:36

Hi,

I like to upgrade one of our products to the latest version of OraDirect.NET but I don't want to break all other builds on the buildserver.

The setup says I should uninstall the old version but that will break all other projects.

Any suggestions how to handle this?
vmakkenz
 
Posts: 18
Joined: Tue 26 Aug 2008 13:30

Postby Shalex » Tue 26 Aug 2008 16:38

We recommend you to follow these steps:
1. Install the older version of OraDirect .NET. Copy CoreLab.Data.dll and CoreLab.Oracle.dll files from \Program Files\CoreLab\OraDirect.NET2 to a temporary folder.
2. Uninstall this previous version.
3. Install newer OraDirect .NET version.
4. Delete from \WINDOWS\assembly the following files: policy.*.CoreLab.Data and policy.*.CoreLab.Oracle.
5. Add to \WINDOWS\assembly *.dll files from the older version.

Please note that there must be correct versions specified in your project's references.
Shalex
Devart Team
 
Posts: 7208
Joined: Thu 14 Aug 2008 12:44

Postby vmakkenz » Thu 28 Aug 2008 08:31

I did all the steps mentioned but some of our tests are now failing with the following message:

System.InvalidCastException : Unable to cast object of type 'CoreLab.Oracle.OracleCommand' to type 'CoreLab.Oracle.OracleCommand'

I tried to debug the failing tests and noticed that both versions are now loaded.

(Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
(Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'
(Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\CoreLab.Oracle\4.75.39.0__09af7300eec23701\CoreLab.Oracle.dll'
(Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll'
(Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\CoreLab.Oracle\4.0.14.0__09af7300eec23701\CoreLab.Oracle.dll'
(Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\CoreLab.Data\4.70.23.0__09af7300eec23701\CoreLab.Data.dll'


I've set the references in my project to use specified version and copy local and the dll's are indeed placed in the bin dir but I think enterprise library still loads the latest version from the GAC.

Any tips on how I can prevent this?
vmakkenz
 
Posts: 18
Joined: Tue 26 Aug 2008 13:30

Postby vmakkenz » Thu 28 Aug 2008 10:39

I changed to machine.config and that seems to do the trick.

was:
type="CoreLab.Oracle.OracleProviderFactory, CoreLab.Oracle, Version=4.75.39.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />

changed to"
type="CoreLab.Oracle.OracleProviderFactory, CoreLab.Oracle, Version=4.0.14.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />

Now I only have to figure out how to use the new version in new projects :)
vmakkenz
 
Posts: 18
Joined: Tue 26 Aug 2008 13:30

Postby Shalex » Thu 28 Aug 2008 11:53

Applications seek assemblies to load in GAC firstly, then in the bin directory.
If you specified needed version in project's references, it will be loaded. Please make sure there are no policy.*.CoreLab.Data and policy.*.CoreLab.Oracle in your GAC.
If your application loads assemblies of versions specified in *.config files you just need to change these files.
Shalex
Devart Team
 
Posts: 7208
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle