Skip to content

Add default configuration and logging to CreateSlimBuilder - #47797

Merged
eerhardt merged 3 commits into
dotnet:mainfrom
eerhardt:Fix47598
Apr 24, 2023
Merged

eerhardt merged 3 commits into
dotnet:mainfrom
eerhardt:Fix47598

Conversation

@eerhardt

Copy link
Copy Markdown
Member

Add default configuration and logging to CreateSlimBuilder

Update slim builder to include:

  • JSON file configuration for appsettings.json and appsettings.{EnvironmentName}.json
  • UserSecrets configuration
  • Console logging
  • Logging configuration

This adds back some app size to the api template app. But it is worth the tradeoff given users expect these things to work out of the box.

Update api template with appsettings files and remove AddConsole

Fix #47598

 Update slim builder to include:
- JSON file configuration for appsettings.json and appsettings.{EnvironmentName}.json
- UserSecrets configuration
- Console logging
- Logging configuration

This adds back some app size to the api template app. But it is worth the tradeoff given users expect these things to work out of the box.

Fix dotnet#47598
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Apr 20, 2023

@DamianEdwards DamianEdwards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one line to remove in appsettings.json

@eerhardt
eerhardt dismissed DamianEdwards’s stale review April 22, 2023 20:39

Addressed comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON file and UserSecrets configuration providers, and console logging w/ configuration to CreateSlimBuilder

5 participants