ej wrote:
Hi,
I work with fokshall and we've figured it out.
The C:\oracle\product\12.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll was not in the GAC under _C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess
_
We've performed the following in order:
- Open “Developer Command Prompt for VS 2017” in administrator mode (search for the app in the “Search Windows” taskbar)
- Change Directory to C:\oracle\product\12.2.0\client_1\odp.net\bin\4
- Type the text gacutil –i Oracle.DataAccess.dll then press EnterThe path _C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess_ now exists.
If it's not in the GAC then a registration in machine.config indeed won't work in general. But still curious why you're using 32bit, you should use 64bit and also preferably the managed provider which comes with 12.2 ODAC. 32bit is discontinued by Oracle.
Also, we had to modify C:\Program Files (x86)\Solutions Design\LLBLGen Pro v5.3\LLBLGenPro_x86.exe.config by adding the entry Oracle.DataAccess.Client (and remove this same entry from the machine.config):
<system.data>
<DbProviderFactories>
<!-- The definitions below are examples. It's likely you have to adjust the version numbers to the version the dll you're using. -->
<!-- Firebird. Uncomment the following line if you're using a Firebird Sql client version 2.x. If you're using v3.x or higher and have run the installer, leave this line commented out, otherwise uncomment the line below and place the Firebird client DLL in the installation folder of the designer.-->
<!--<add name="Firebird Client Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.7.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c"/>-->
<!-- PostgreSql -->
<!--<add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.0.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>-->
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
Only if you don't add a line to machine.config.
I'm just curious, can we use LLBLGen 5.3 Designer by placing the Oracle.DataAccess.dll in a directory somewhere in C:\Program Files (x86)\Solutions Design\LLBLGen Pro v5.3 (similar to how .net apps have the "bin" directory where DLLs in this directory do not have to be in the GAC) or does the Oracle.DataAccess.dll require a GAC registration in order to use LLBLGen 5.3 Designer?
That's not going to work as that dll is just a wrapper around the Oracle CLI, so it might load it but I wouldn't be surprised if the dll wants to load dlls / other data which is expects close by (e.g. same folder) but now can't load things.
So to recap, you really shouldn't do this, please use 64bit and the managed provider, just install the 64 bit ODAC components and ignore 32bit. It's not worth the trouble.