Fix hosting startup tests (#81).
This commit is contained in:
parent
fb26ff2674
commit
41cb9ea31c
|
|
@ -73,13 +73,13 @@ namespace IISSample
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new ConfigurationBuilder()
|
||||||
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
|
||||||
|
.AddCommandLine(args)
|
||||||
|
.Build();
|
||||||
|
|
||||||
var host = new WebHostBuilder()
|
var host = new WebHostBuilder()
|
||||||
.ConfigureAppConfiguration((hostingContext, config) =>
|
.UseConfiguration(config)
|
||||||
{
|
|
||||||
config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
|
||||||
config.AddCommandLine(args);
|
|
||||||
})
|
|
||||||
.ConfigureLogging((hostingContext, builder) =>
|
.ConfigureLogging((hostingContext, builder) =>
|
||||||
{
|
{
|
||||||
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue