Answer the question
In order to leave comments, you need to log in
How to find host created by CreateHostBuilder(args).Build()?
Good afternoon. I study the features of working with .Net Core, in particular with their generic host mechanism (Generic Host).
I got the feeling that I was confused.
Do I understand correctly that if you create and run a host in a console application, like this:
class Program
{
static void Main(string[] args)
{
using IHost host = CreateHostBuilder(args).Build();
host.RunAsync();
Console.ReadLine();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureHostConfiguration(builder =>
{
//empty
});
}
Answer the question
In order to leave comments, you need to log in
That this host, will be launched in a separate background-process? That is, the console application process is separate, and the host process is separate?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question