Skip to content
New issue

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

Don't crash with appsettings.json is missing, perhaps nicer message or create a default config. #5

Open
jafin opened this issue Apr 18, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@jafin
Copy link
Collaborator

jafin commented Apr 18, 2020

If appsettings.json missing app throws exception

Unhandled exception. System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The physical path is 'c:\Utils\CDE\appsettings.json'.
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at cde.Config.ConfigBuilder.Build(String[] args)
   at cde.AppContainerBuilder.BuildContainer(String[] args)
   at cde.Program.InitProgram(String[] args)
   at cde.Program.Main(String[] args)
@jafin jafin added the enhancement New feature or request label Apr 18, 2020
@jafin jafin added this to the NET Core 3.1 milestone Apr 18, 2020
@jafin jafin removed this from the NET Core 3.1 milestone Oct 1, 2022
@jafin jafin changed the title Don't explode with appsettings.json is missing, perhaps nicer message or create a default config. Don't crash with appsettings.json is missing, perhaps nicer message or create a default config. Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant