You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, a relatively recent decision was made to change how application host construction is done. The "old" way was a series of chained method calls on classes that implement the IHostBuilder interface. Apparently, there were issues with that, and so a complete cut was made—a new HostApplicationBuilder class was created which does not implement IHostBuilder.
So, translating this into System.CommandLineBuilder, I tried:
varrootCommand=newRootCommand("The root command.");varcommandLineBuilder=newCommandLineBuilder(rootCommand).UseDefaults().UseHost(Host.CreateApplicationBuilder/* BOOM: Not an IHostBuilder!! */, hostBuilder =>{// Configure your host here...}).Build();
But as you can see, with the new "recommended" pattern, this fails because there is no overload of UseHost() that accepts an HostApplicationBuilder builder.
KalleOlaviNiemitalo, JanKrivanek, suprak and Balkoth