Hello I'm getting a problem not getting hit into Program.cs . We converted this project from previous .NET core . Now we are using latest .NET core 5 web api . I think when the first application run this project debug mode should go to Program.cs Main Function but it is not going . Here is my code of Program.cs :
public static async Task Main(string[] args)
{
Utility.Log.Init("Webdamad");
Utility.Log.I("Test");
platform.Check();
await LoadMasterAsync().ConfigureAwait(false);
Models.MyModelName.Init();
Models.MySecondModel.Init();
CreateHostBuilder(args).Build().Run();
Utility.Log.I("Init End");
}
Here Is Create HostBuilder
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseUrls($"http://*:{platform.port}");
webBuilder.UseStartup<Startup>();
});
I think I have some route Problem and From Where should I Check . Thanks in advance . Every Project when The Project run should go to Main Function but here it is not going .
Mainmethods? You say it doesn't enter this one, so what happens instead?