We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.UseDefaultHostingConfiguration(args) has been removed.
.UseDefaultHostingConfiguration(args)
To have equivalent behavior from before you can add:
var config = new ConfigurationBuilder() .AddJsonFile("hosting.json", optional: true) .AddEnvironmentVariables(prefix: "ASPNETCORE_") .AddCommandLine(args) .Build(); var host = new WebHostBuilder() .XYZ() .UseConfiguration(config) .ZYX() .Build();
And also ensure the application's project.json file has references to these NuGet packages:
project.json
Microsoft.Extensions.Configuration.ComandLine
Microsoft.Extensions.Configuration.EnvironmentVariables
Microsoft.Extensions.Configuration.Json
In addition ASPNETCORE_ENVIRONMENT is included as a fallback if you don't add a setting for "environment" yourself.
ASPNETCORE_ENVIRONMENT
Most apps don't need all these settings though.
Issues causing the removal of UseDefaultHostingConfiguration are aspnet/Hosting#700 and aspnet/Hosting#727
UseDefaultHostingConfiguration
Please use aspnet/Hosting#737 for discussion
The text was updated successfully, but these errors were encountered:
No branches or pull requests
.UseDefaultHostingConfiguration(args)
has been removed.To have equivalent behavior from before you can add:
And also ensure the application's
project.json
file has references to these NuGet packages:Microsoft.Extensions.Configuration.ComandLine
Microsoft.Extensions.Configuration.EnvironmentVariables
Microsoft.Extensions.Configuration.Json
In addition
ASPNETCORE_ENVIRONMENT
is included as a fallback if you don't add a setting for "environment" yourself.Most apps don't need all these settings though.
Issues causing the removal of
UseDefaultHostingConfiguration
are aspnet/Hosting#700 and aspnet/Hosting#727Please use aspnet/Hosting#737 for discussion
The text was updated successfully, but these errors were encountered: