我创建了 JwtHelper 类。我已经使用它很长时间了。但是,当我更新软件包时,以下行出现错误;
完整的错误信息如下;
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?)
我找到了解决方案。我写在这里是为了不要浪费时间。
最佳答案
转到 Nuget 并下载“Microsoft.Extensions.Configuration.Binder”包。
Install-Package Microsoft.Extensions.Configuration.Binder -Version 5.0.0
关于.net - “IConfigurationSection”不包含 'Get' 的定义并且没有可访问的扩展名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67019309/