Issue with RuntimeConfiguration and OracleDQE V5.3.2, .Net Standard 2.0

Posts   
 
    
Posts: 2
Joined: 28-May-2021
# Posted on: 28-May-2021 16:06:05   

Hi,

I'm trying to convert my project from .Net full to .Net standard 2.0 and when I'm trying to configure Oracle DQE (obtained through nuget, wasn't shipped with original package). When I call RuntimeConfiguration.ConfigureDQE, I get the followin error : ORMConfigurationException : No DbProviderFactory has been configured for this DQE. You have to use the DQE configuration system to register at least one DbProviderFactory.

To make sure that I use the right factory, I allocate it and use GetType() to get its name. I'm using OracleManagedDataAccess.Core 2.19.110 (from nuget).

            Oracle.ManagedDataAccess.Client.OracleClientFactory clientFactory = new Oracle.ManagedDataAccess.Client.OracleClientFactory();

            RuntimeConfiguration.ConfigureDQE<OracleDQEConfiguration>(c =>
                c.AddDbProviderFactory(clientFactory.GetType()));
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 29-May-2021 10:19:51   

As you're converting your project to .net standard, your generated code is likely still using the old csproj files. These aren't generated when they exist. could you remove these in your generated code folders and then generate code for .netstandard20 ? This will then make sure your generated code (and your own project) refers to the netstandard20 build of the llblgen pro oracle dqe package / assembly and not the .net 452 build.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 2
Joined: 28-May-2021
# Posted on: 31-May-2021 16:39:16   

Thanks for the quick reply.

I just did and I still have the same issue. I must add that when I generate the sources from the llblgen designer, the generator doesn't add the

using SD.LLBLGen.Pro.DQE.Oracle;

to the CommonDaoBase.cs file, I have to add it manually. Could it be a symptom of something else?

Thanks,

Dany.

P.S.: Attached to this post, you will find a very simple solution which shows the same problem I'm getting. I wrote it from scratch.

Attachments
Filename File size Added on Approval
NetStdSampleSrc.zip 147,493 31-May-2021 22:04.25 Approved
Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 01-Jun-2021 04:35:59   

You need to use the latest SD.LLBLGen.Pro.ORMSupportClasses and SD.LLBLGen.Pro.DQE.OracleODPNET (v.5.8 ). Since the DQE version you are using, doesn't support .NET Standard.2.1, as stated in the package warning in VS.

You will need to regenerate the code from the 5.8 Designer version.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 01-Jun-2021 08:50:46   

Btw, our runtime doesn't have .netstandard 2.1 specific code, so you can just as well set the target to netstandard2.0

Frans Bouma | Lead developer LLBLGen Pro