IConfiguration does not contain a definition for GetValue

前端 未结 1 870
名媛妹妹
名媛妹妹 2021-02-04 23:14

After moving a class through projects, one of the IConfiguration methods, GetValue, stopped working. The usage is like this:



        
1条回答
  •  悲&欢浪女
    2021-02-04 23:48

    Just install Microsoft.Extensions.Configuration.Binder and the method will be available.

    The reason is that GetValue is an extension method and does not exist directly in the IConfiguration interface.

    0 讨论(0)
提交回复
热议问题