Asp.Net Core 6 new initialization - Program.vb
1: Imports Microsoft.AspNetCore.Hosting
2: Imports Microsoft.Extensions.Hosting
3: Imports Microsoft.Extensions.Logging
4:
5: Public Class Program
6: Public Shared Sub Main(ByVal args As String())
7: CreateHostBuilder(args).
8: Build.
9: Run
10: End Sub
11:
12: Public Shared Function CreateHostBuilder(ByVal args As String()) As IHostBuilder
13: Return Host.
14: CreateDefaultBuilder(args).
15: ConfigureLogging(Sub(hostingContext, logging)
16: logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"))
17: logging.AddConsole()
18: logging.AddDebug()
19: logging.AddFilter("Microsoft.AspNetCore.SignalR", LogLevel.Debug)
20: logging.AddFilter("Microsoft.AspNetCore.Http.Connections", LogLevel.Debug)
21: End Sub).
22: ConfigureWebHostDefaults(Sub(webBuilder)
23: webBuilder.
24: UseStartup(Of Startup).
25: UseUrls("http://localhost:4000")
26: End Sub)
27: End Function
28: End Class
Comments (
)
Link to this page:
http://www.vb-net.com/NetCore6Ini/Program.vb.htm
|