3
“ ILoggerFactory”不包含“ AddConsole”的定义
private ILoggerFactory ConfigureLogging(ILoggerFactory factory) { factory.AddConsole(); return factory; } 我已经在Github上找到了上面的代码。它给出以下错误: 'ILoggerFactory' does not contain a definition for 'AddConsole' and the best extension method overload 'ConsoleLoggerExtensions.AddConsole(ILoggingBuilder)' requires a receiver of type 'ILoggingBuilder' 我正在使用NET Core 3.0,并且安装了以下NuGet软件包。 <PackageReference Include="Discord.Net" Version="2.1.1" /> <PackageReference Include="Discord.Net.Commands" Version="2.1.1" /> <PackageReference Include="Discord.Net.WebSocket" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="3.0.0" /> …
20
c#
nuget
core
discord.net