Fırat DİKMEN
Fırat DİKMEN

Reputation: 984

'IConfigurationSection' does not contain a definition for 'Get' and no accessible extension

I created the JwtHelper class. I have been using it for a long time. However, when I updated the packages, I got an error in the following line;

Error Lines

The complete error message is as follows;

Severity Code Description Project File Line Suppression State Error CS1061 'IConfigurationSection' does not contain a definition for 'Get' and no accessible extension method 'Get' accepting a first argument of type 'IConfigurationSection' could be found (are you missing a using directive or an assembly reference?)

I found the solution. I'm writing here so you don't waste time.

Upvotes: 15

Views: 11231

Answers (1)

Fırat DİKMEN
Fırat DİKMEN

Reputation: 984

Go to Nuget and download the "Microsoft.Extensions.Configuration.Binder" package.

enter image description here

Install-Package Microsoft.Extensions.Configuration.Binder -Version 5.0.0

Upvotes: 46

Related Questions