Extension Methods not Recognized

前端 未结 12 1032
抹茶落季
抹茶落季 2020-12-10 00:09

What is necessary to have an extension method honored when it exists in an imported assembly? I built one in a class library project but it is not recognized in my web proj

12条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 01:01

    You should be careful about method signature

    public static ILoggingBuilder AddCustomizedLogging(this ILoggingBuilder builder, string appInsightsKey)

    "this" modifier is required for extension methods

提交回复
热议问题