Remove references to UseDefaultHostingConfiguration
This commit is contained in:
parent
2887f2ee83
commit
693f58c18f
|
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Localization;
|
using Microsoft.AspNetCore.Localization;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
using Microsoft.Extensions.PlatformAbstractions;
|
||||||
|
|
@ -154,9 +155,11 @@ $@"<!doctype html>
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new ConfigurationBuilder().AddCommandLine(args).Build();
|
||||||
|
|
||||||
var host = new WebHostBuilder()
|
var host = new WebHostBuilder()
|
||||||
.UseDefaultHostingConfiguration(args)
|
|
||||||
.UseKestrel()
|
.UseKestrel()
|
||||||
|
.UseConfiguration(config)
|
||||||
.UseIISIntegration()
|
.UseIISIntegration()
|
||||||
.UseStartup<Startup>()
|
.UseStartup<Startup>()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.Localization": "1.0.0-*",
|
"Microsoft.AspNetCore.Localization": "1.0.0-*",
|
||||||
|
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Localization": "1.0.0-*",
|
"Microsoft.Extensions.Localization": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*"
|
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
namespace LocalizationWebsite
|
namespace LocalizationWebsite
|
||||||
{
|
{
|
||||||
|
|
@ -9,9 +10,14 @@ namespace LocalizationWebsite
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new ConfigurationBuilder()
|
||||||
|
.AddCommandLine(args)
|
||||||
|
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
|
||||||
|
.Build();
|
||||||
|
|
||||||
var host = new WebHostBuilder()
|
var host = new WebHostBuilder()
|
||||||
.UseKestrel()
|
.UseKestrel()
|
||||||
.UseDefaultHostingConfiguration(args)
|
.UseConfiguration(config)
|
||||||
.UseStartup("LocalizationWebsite")
|
.UseStartup("LocalizationWebsite")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||||
"Microsoft.AspNetCore.Localization": "1.0.0-*",
|
"Microsoft.AspNetCore.Localization": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||||
|
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Localization": "1.0.0-*",
|
"Microsoft.Extensions.Localization": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging.Console": "1.0.0-*"
|
"Microsoft.Extensions.Logging.Console": "1.0.0-*"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue