I'm writing a .Net Core C# console program. When testing, it was convenient to use the Environment Variables as defined in the project properties:
And I wrote simple code like this:
string rdsDatabase = System.Environment.GetEnvironmentVariable("RDSDatabase");
I just learned there is no .exe created, and you have to use "DotNet" to run the .net core console program (https://blogs.msdn.microsoft.com/benjaminperkins/2017/03/07/net-core-application-where-is-my-exe-how-to-publish/). In that scenario, where do I put those environmental variables at run time? I know there are alternatives such as described in this article: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration?tabs=basicconfiguration. Can I keep it simple and use the GetEnvironmentVariable?