In ASP.NET Core nested configuration via environment variables is typically done via colon syntax:
MySettings:SomeSetting=MyNewValue
How do you do this in Linux? The export
command rejects the colon? eg:
export MySettings:SomeSetting=MyNewValue
Errors with
bash: export: `MySettings:SomeSetting=MyNewValue': not a valid identifier
It is a colon-separated list of directories in which the shell looks for commands (see COMMAND EXECUTION below). A zero-length (null) directory name in the value of PATH indicates the current directory.
With ASP.NET Core, you can build and run . NET applications not only on Windows but also macOS and Linux.
Reading the docs carefully:
If
:
cannot be used in environment variables in your system, replace:
with__
(double underscore).
ie:
export MySettings__SomeSetting=MyNewValue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With