ConfigFileHelper does not contain a definition for ReadConnectionStringFromConfig

Posts   
 
    
Maris
User
Posts: 7
Joined: 17-Apr-2023
# Posted on: 17-Apr-2023 15:05:45   

I moved App.config file from DatabaseSpecific to my project but when i build it it bring me this error: ConfigFileHelper does not contain a definition for ReadConnectionStringFromConfig

Error apears in DataAccessAdapter.cs

Project: 4.8 .NET LLBLGEN: 5.9

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 17-Apr-2023 18:40:27   

I think you referenced the .netstandard 2.x version of the ORMSupportClasses, but you should reference the normal one. The .netstandard 2.x version doesn't have any code in ConfigHelper, as netstandard 2.0 doesn't support config file reading.

If you used the nuget packages, make sure you have specified the right .net target in your csproj file. It might be you generated code for .netstandard20 which references the nuget packages by default but also specifies netstandard20 as targetdefinition in the csproj, so it'll reference the netstandard20 version of the ormsupport classes

Frans Bouma | Lead developer LLBLGen Pro
Maris
User
Posts: 7
Joined: 17-Apr-2023
# Posted on: 18-Apr-2023 10:50:32   

Thanks, that solved my problem(uninstalled library and added again from nugget).