VS2019 web project 4.7.1 framework
Till Visual studio 2017, there was a file to store Environment variables "launchsettings.json"
using c# environment.GetEnvironmentVariable("Name of variable") we can read environment variable values,
Recently I created a new project in VS2019 and there is no file by default as "launchsettings.json" and when I added JSON file manually c# code is not able to read those environment variables
Does anybody know where to store environment variables in VS2019?
You have 2 ways to access the environment variable section.
You can add/change them through launchsettings.json.

Or you can right-click on the project and select Properties. Then you go under Debug tab and you will be able to change them.

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