Share via


WebHostBuilderKestrelExtensions.UseKestrelCore(IWebHostBuilder) Method

Definition

Specify Kestrel as the server to be used by the web host. Includes less automatic functionality than UseKestrel(IWebHostBuilder) to make trimming more effective (e.g. for Native AOT scenarios). If the host ends up depending on some of the absent functionality, a best-effort attempt will be made to enable it on-demand. Failing that, an exception with an informative error message will be raised when the host is started.

public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrelCore (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);
static member UseKestrelCore : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseKestrelCore (hostBuilder As IWebHostBuilder) As IWebHostBuilder

Parameters

hostBuilder
IWebHostBuilder

The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure.

Returns

The Microsoft.AspNetCore.Hosting.IWebHostBuilder.

Applies to