Page 1 of 2
Could not load type 'CoreLab.Common.DbConnection'
Posted: Sun 12 Feb 2006 14:38
by MiKu
We have a DLL that can be started two ways.
Standalone via a EXE Files that has a reference to this DLL.
Embedded into an other Application that allows us to load the DLL
by runtime via a NETLOAD Command.
The Standaloneversuion works find but the Embedded Version
gives us this error since we switched to the Version 3.2 of Corelab.
(With the Versions before 3.2, everthing works fine.....)
On Login to Oracle this comes up on Connection.Open
Description:
Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle, Version=3.20.6.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.
Type: System.TypeLoadException
If I remove the Corelab Assemblies from GAC
and place the Corelab DLL's to the BIN Dircetory of our Application
The Standalone version works fine and the Embedded Version
displayes the Error Message before plus:
>>License expired or not valid.
The File "licenses.licx" is embedded in our DLL.
(And it works if starting standalone)
Do you have any Idea what the Problem could be.
As noticed, this Problem appears since we use Corelab 3.2.
With the Versions before we didn't have this Problem.
Posted: Mon 13 Feb 2006 09:46
by Paul
We can reproduce your problem with "Could not load type 'CoreLab.Common.DbConnection'" when COM object is loading in .NET 2.0 framework but COM is written on .NET 1.1. Please check what modules are loaded with your application and that all versions are correct.
Most probably the exception "License expired or not valid" happens because you didn't include "licenses.licx" to the main application file.
Please try downloading OraDirect .NET 3.20.7 from our site. We fixed some problems with licensing there. Additionally we added ability to leave "licenses.licx" in DLL module
OraDirect .NET 3.20.7 allows to create class libraries that can be used with certain executable files. To do this, create a text file named licenses.config and place it next to licenses.licx. In this file enumerate names of executable files that will work with the library, every file name on separate line, for example:
MyApplication.exe
MyAnotherApp.exe
ExtraTool.exe
You do not have to add the file licenses.config to project.
Could not load type 'CoreLab.Common.DbConnection'
Posted: Mon 13 Feb 2006 13:13
by MiKu
Thanx for your quick reply
We can't find 3.20.7 under the Download Page
It's only avaliable on the Trialversion Page.
Can you place it as Full Version too, tha would be great
Thanx
Micha
Posted: Tue 14 Feb 2006 08:43
by Paul
Please try again
Could not load type 'CoreLab.Common.DbConnection'
Posted: Wed 06 Dec 2006 18:06
by Tobi
I have the same problem here with using CoreLab 3.50.14.0.
While using an .NET 1.1 dll, containing the OracleConnection, within an .NET 2.0 executable, I get this message. I already added the executables - name to the licenses.config file of the dll, but the message didn't disappear.
Thank you for any help !
Posted: Wed 06 Dec 2006 18:49
by schueler
Hello,
I think I have the same problem. Does this have something to do when having the .NET 1.1 and .NET 2.0 version installed. How does .NET link the dll's, maybe it gets confused because the 2.0 and 1.1 version have exactly the same strong name.
Bye,
Rainer
Posted: Thu 07 Dec 2006 07:30
by Alexey
I have the same problem
Which problem do you two have?
Tobi wrote:I get this message
What message do you get?
Posted: Thu 07 Dec 2006 08:42
by schueler
Here is my exception message:
"Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle, Version=3.50.14.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.":"CoreLab.Common.DbConnection"
There is a CoreLab.Oracle.dll with version 3.50.14.0 in my bin\debug folder with exact this public key token. Why is .NET not able to find it?
Posted: Thu 07 Dec 2006 10:02
by Alexey
When do you get this message? Do you get it locally (remove dll from the Bin folder)?
Posted: Thu 07 Dec 2006 10:34
by Tobi
I get the same message:
"Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle, Version=3.50.14.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.":"CoreLab.Common.DbConnection"
what do you mean with:
Do you get it locally
The error occurs always, when using a .NET 1.1 dll using an OracleConnection within a .NET 2.0 application.
Posted: Mon 11 Dec 2006 08:04
by Alexey
We are investigating this problem.
You will be notified on results as soon as possible.
Posted: Wed 20 Dec 2006 09:19
by Tobi
Could you reproduce this problem ?
Posted: Fri 29 Dec 2006 08:21
by Alexey
You should use .NET 1.x assembly with .NET 1.x Framework and .NET 2.0 assembly with .NET 2.0 Framework.
You should adjust your application settings to work with COM objects appropriately.
Posted: Mon 01 Jan 2007 14:01
by Tobi
We know, that it is not the best way of doing it. But if you are using around 30 components from different vendors within your application, it is important for us, to migrate the dll-s step by step from .NET 1.1 to .NET 2.0. The only dll preventing us from the step-by-step migration is your dll. From our point of view it seems to be an licensing-issue inside your component and not a "real" technical problem. So if you could provide us with a solution, it would prevent us from changing our application within a single day to .NET 2.
Thank you,
Tobi
Posted: Wed 03 Jan 2007 08:14
by Alexey
"Could not load type 'CoreLab.Common.DbConnection' from assembly 'CoreLab.Oracle'" is not licensing problem, but the problem when it is not possible to load base class from another framework.
Inheritor cannot be loaded, because base classes' interfaces are different.