I created an ASP.NET Core 3.0 Web Application with the default template in Visual Studio 2019 Preview 2.2 and tried to inject an ILogger in Startup:
namespace We
This can be solved by registering the ILogger
manually to use the Startup class as type.
Example:
public void ConfigureServices(IServiceCollection services)
{
// Normal AddLogging
services.AddLogging();
// Additional code to register the ILogger as a ILogger where T is the Startup class
services.AddSingleton(typeof(ILogger), typeof(Logger));
// ...
}