exception: File or assembly name SD.LLBLGen.Pro.DBDrivers.OracleDBDriver was not found

Posts   
 
    
Aglaia avatar
Aglaia
LLBLGen Pro Team
Posts: 535
Joined: 07-Sep-2003
# Posted on: 21-Aug-2007 14:13:08   

Question: When I start a new project and I retrieve the schema from the database, or when I refresh a catalog, sometimes (not always) I get the following exception: File or assembly name SD.LLBLGen.Pro.DBDrivers.OracleDBDriver, or one of its dependencies, was not found.

What can I do to solve this? ** Solution:** Add the SD.LLBLGen.Pro.DBDrivers.OracleDBDriver.dll to the GAC. The cause of the exception is unclear, it seems that the Oracle.DataAccess.dll assembly changes the directory the parent assembly (SD.LLBLGen.Pro.DBDrivers.OracleDBDriver.dll) is loaded from, which makes the CLR to look for the SD.LLBLGen.Pro.DBDrivers.OracleDBDriver.dll in the application directory instead of the drivers\oracle\ directory.

To add the assembly to the gac: browse to C:\windows\assembly (or c:\winnt\assembly) in the windows explorer. Drag the SD.LLBLGen.Pro.DBDrivers.OracleDBDriver.dll file from the (LLBLGen Pro installation folder)\Drivers\Oracle\ folder to this c:\windows\assembly folder. You can also use gacutil.exe.

The file is initially not added to the GAC because MS advices not to do this if not explicitely necessary. The SqlServer driver does not have this problem.