My project is simple WebApi server, based on netcoreapp2.0.
I have simple appsettings.json
{
"logPath":"C:\logs\myLog.log"
}
And it's logPath
ok, if app will work on Windows platform, but i want also run it on linux. I know, that i can use console args or enviroment variables for override this setting, but i want to get OS specific override for appsettings.json
. Something like appsettings.linux.json
(may be appsettings file, that depends on RID) with content
{
"logPath":"\var\tmp\myLog.log"
}
Ideally if this theoretical appsettings.linux.json
will only included in build output, if i will build my app for specific RID.
How can i do that if it available?