googleads / googleads-dotnet-lib

Google Ad Manager SOAP API .NET client library
Apache License 2.0
108 stars 199 forks source link

Cannot load correct settings from IConfigurationSection #221

Open angelalb opened 4 years ago

angelalb commented 4 years ago

I am trying to instantiate AdWordsAppConfig by passing an IConfigurationSection in Net Core 2.2, but the settings are not mapped corrently (at all).

I am using a nested section, and I believe the problem comes from this line:

https://github.com/googleads/googleads-dotnet-lib/blob/ee70a92cfb2849ee6d1706500328c406008bee5b/src/Common/Lib/AppConfigBase.cs#L457

I believe the section prefix should be configurationSection.Path. With nested configuration sections, the key property only has the innermost key.