зеркало из https://github.com/aspnet/Localization.git
Remove references to UseDefaultHostingConfiguration
This commit is contained in:
Родитель
2887f2ee83
Коммит
693f58c18f
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Builder;
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
|
@ -154,9 +155,11 @@ $@"<!doctype html>
|
|||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var config = new ConfigurationBuilder().AddCommandLine(args).Build();
|
||||
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseKestrel()
|
||||
.UseConfiguration(config)
|
||||
.UseIISIntegration()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
|
||||
"Microsoft.AspNetCore.Localization": "1.0.0-*",
|
||||
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*",
|
||||
"Microsoft.Extensions.Localization": "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.
|
||||
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace LocalizationWebsite
|
||||
{
|
||||
|
@ -9,9 +10,14 @@ namespace LocalizationWebsite
|
|||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var config = new ConfigurationBuilder()
|
||||
.AddCommandLine(args)
|
||||
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
|
||||
.Build();
|
||||
|
||||
var host = new WebHostBuilder()
|
||||
.UseKestrel()
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseConfiguration(config)
|
||||
.UseStartup("LocalizationWebsite")
|
||||
.Build();
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||
"Microsoft.AspNetCore.Localization": "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.Logging.Console": "1.0.0-*"
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче