File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change 1919
2020namespace Microsoft . AspNetCore . Hosting ;
2121
22+ [ Obsolete ( "WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead." ) ]
2223internal sealed partial class WebHost : IWebHost , IAsyncDisposable
2324{
2425 private const string DeprecatedServerUrlsKey = "server.urls" ;
Original file line number Diff line number Diff line change @@ -160,12 +160,14 @@ public IWebHost Build()
160160
161161 AddApplicationServices ( applicationServices , hostingServiceProvider ) ;
162162
163+ #pragma warning disable CS0618 // Type or member is obsolete
163164 var host = new WebHost (
164165 applicationServices ,
165166 hostingServiceProvider ,
166167 _options ,
167168 _config ,
168169 hostingStartupErrors ) ;
170+ #pragma warning restore CS0618 // Type or member is obsolete
169171 try
170172 {
171173 host . Initialize ( ) ;
You can’t perform that action at this time.
0 commit comments