In my case I have a dot net core console project with targetframework net462 (I am using the latest sdk 2.1.
When I reference the nuget package from this project it uses the net452 lib.
In my code I configure with:
RuntimeConfiguration.ConfigureDQE<OracleDQEConfiguration>(cfg =>
{
cfg.SetTraceLevel(TraceLevel.Verbose);
cfg.AddDbProviderFactory(typeof(Oracle.ManagedDataAccess.Client.OracleClientFactory));
});
This throws:
System.TypeInitializationException: The type initializer for 'SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine' threw an exception. ---> SD.LLBLGen.Pro.ORMSupportClasses.ORMGeneralOperationException: None of the factories in the list of 'Oracle.ManagedDataAccess.Client, Oracle.DataAccess.Client' were found. Please check machine.config and the .NET version your application is running on.
at SD.LLBLGen.Pro.ORMSupportClasses.DbProviderFactoryInfo.get_FactoryToUse()
at SD.LLBLGen.Pro.ORMSupportClasses.DbProviderFactoryInfo.InitializeEnumTypeCache()
at SD.LLBLGen.Pro.DQE.Oracle.OracleSpecificCreator.SetDbProviderFactoryParameterData(List`1 dbProviderFactoryInvariantNamesWithEnumTypeNames, String dbProviderSpecificEnumTypePropertyName)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine..cctor()
--- End of inner exception stack trace ---
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.Configure(OracleDQEConfiguration configuration)
at Idella.FS.Bgs.BgsImporter.Program.ConfigureDynamicQueryEngine(AppSettings appSettings)
I works correctly when I use a direct assembly reference to the netstandard2.0 lib.
Anyway to force load the netstandard2.0 lib? Or do we still need a net452 lib in the package?