I have the following in the appsettings.json (.net core asp.net project):
{
"Serilog": {
"WriteTo": [
{ "Name": "File", "Args": { "path": "sample.txt" } },
{ "Name": "Debug" }
]
}
}
In production, I want to remove the { "Name": "Debug" }
portion, so I have the same thing except for the debug portion in appsettings.Production.json:
{
"Serilog": {
"WriteTo": [
{ "Name": "File", "Args": { "path": "sample.txt" } },
]
}
}
However, the keys seem to be additive, so the Debug
portion is not removed. The keys resolve to serialized values and thus I don't see how they would be removed.
Does appsettings architecture allow for removal of nodes? If so, how?