How to fix obsolete ILoggerFactory methods?

前端 未结 6 1082
庸人自扰
庸人自扰 2020-12-08 09:09

I upgraded my project to .NET Core 2.2.x and got an obsolete warning regarding the following code - both lines:

public void Configure(IApplicationBuilder app         


        
6条回答
  •  一生所求
    2020-12-08 10:01

    Don't worry about it - this is the dumbest thing ever!

    Note

    The following code sample uses a ConsoleLoggerProvider constructor that has been obsoleted in version 2.2. Proper replacements for obsolete logging APIs will be available in version 3.0. In the meantime, it is safe to ignore and suppress the warnings.

    In case you thought you forgot what Obsolete meant - you hadn't! Don't worry about it and just ignore it for now - or suppress the warning (sorry I don't have the code for that to hand).

    (Wish they'd put a better explanation for why this was done - that's what I mean by dumb.)

提交回复
热议问题