Open TMiNus opened 3 years ago
Hey @TMiNus ,
Thanks for bringing this up and we'll be adding the support for parsing custom appsettings.json
configuration files.
You may append AddJsonFile("appsettings.Localhost.json", optional: true, reloadOnChange: true)
to the ConfigurationBuilder
as a workaround if you would like to override the settings from appsettings.Localhost.json
.
Hey @lupengamzn,
Thanks for answering. I am looking forward to the changes.
For the time being I have added an option to inject IConfiguration
into that class, I haven't encountered issues so far with that workaround.
Due to this piece of code
The configuration settings below are not properly applied in localhost
```json "XRay": { "DisableXRayTracing": "false", "UseRuntimeErrors": "true", "CollectSqlQueries": "false", "DaemonAddress": "127.0.0.1:2000", "ServiceName": "defaultService", "TraceHttpRequests": "true", "TraceAWSRequests": "true", "TraceSqlRequests": "true", "TraceEFRequests": "true" } ```appsettings.json
```json "XRay": { "DisableXRayTracing": "true", "UseRuntimeErrors": "true", "CollectSqlQueries": "false", "DaemonAddress": "127.0.0.1:3000", "ServiceName": "defaultService", "TraceHttpRequests": "false", "TraceAWSRequests": "false", "TraceSqlRequests": "false", "TraceEFRequests": "false" } ```appsettings.Localhost.json
I wonder what is the rationale behind loading
appsettings.json
directly instead of receivingIConfiguration
in theRegister
method