Hey all, I've been seeing a similar issue to this one https://www.llblgen.com/tinyforum/Thread/24505 when using LLBLGen.Pro.ORMSupportClasses 5.3.4/System.Data.SqlClient 4.4.0 in a new Console application targeting .NET 6.0 (the referenced projects for "DataAccessAdapter/LinqMetaData" are using .NET Framework 4.8 with the same package versions):
<snip>
using SD.LLBLGen.Pro.DQE.SqlServer;
using SD.LLBLGen.Pro.ORMSupportClasses;
Console.WriteLine("Hello world!");
var _adapter = new DataAccessAdapter("<snip>");
var _database = new LinqMetaData(_adapter);
RuntimeConfiguration.ConfigureDQE<SQLServerDQEConfiguration>(c => c.AddDbProviderFactory(typeof(System.Data.SqlClient.SqlClientFactory)));
Console.WriteLine(_database.Clientele
.Where(c => c.ClientId == "<snip>")
.FirstOrDefault());
Adding the suggested fix in the other thread still returns the same error, just on this newly added line instead of inside the DataAccessAdapter:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine' threw an exception.
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
ORMGeneralOperationException: DbProviderFactory information for compatibilitylevel SqlServer2005 wasn't properly initialized.
My understanding is that the referenced projects don't use a DbProviderFactory because that was added in .NET Core, does anyone here have an idea about how I can resolve this issue?