Method not found: 'System.String SD.LLBLGen.Pro.ORMSupportClasses.ConfigFileHelper.ReadConnectionStringFromConfig(System.String)'

Posts   
 
    
gvb
User
Posts: 19
Joined: 09-Nov-2014
# Posted on: 12-Apr-2021 10:26:57   

Hi support,

I use a method similar to the one below and get the 'Method not found:...' exception.

List<CustomersOnCountryRow> results;
using(var adapter = new DataAccessAdapter(connectionString))
{
    results = await adapter.FetchQueryFromSourceAsync(
                new QueryFactory().GetCustomersOnCountryTypedViewProjection(), 
                RetrievalProcedures.GetCustomersOnCountryCallAsQuery("USA");
}

LLBLGen (Nuget ) v5.8.0 TargetFramework net5.0

Can you help me further?

Regards, Goos van Beek.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 12-Apr-2021 10:31:04   

You need to generate code for .netstandard2.0, not for .net 4.8. .net 5 is a continuation of .net core, not .net full. the .net standard build avoids config files and uses configuration through the RuntimeConfiguration class.

Frans Bouma | Lead developer LLBLGen Pro
gvb
User
Posts: 19
Joined: 09-Nov-2014
# Posted on: 12-Apr-2021 10:45:53   

Otis wrote:

You need to generate code for .netstandard2.0, not for .net 4.8. .net 5 is a continuation of .net core, not .net full. the .net standard build avoids config files and uses configuration through the RuntimeConfiguration class.

Thanks for your quick reply!

Generating the code for .netstandard 2.0 solved this issue.

Thanks, Goos van Beek.