Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

ASP.NET 3.0 : 'Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger`1[Application.Startup]' while attempting to activate Application.Identity.Startup'.'

$
0
0

I am upgrading my ASP.NET 2.1 Application to ASP.NET 3.0, While running I am getting error as ''Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger`1[Application.Startup]' while attempting to activate Application.Identity.Startup'.''. I have used IHostBuilder instead of IWebHostBuilder.Below is my Program.cs for reference

public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureLogging(logging =>
          {
            logging.ClearProviders();
            logging.AddConsole();
          })
        .ConfigureWebHostDefaults(webBuilder =>
        {
          webBuilder.UseStartup<Startup>();
        });


Viewing all articles
Browse latest Browse all 9386

Trending Articles