How do add and read appsettings in Visual Code?
I'm using Visual Code and I want set values in the appsettings file. Then retrieve them using Configuration Manager - see below - I'm getting following error:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Program.Main() in C:\Chaumette\Development\IntuneTokenApp\Program.cs:line 11
Visual Code is new to me- I'm not sure why it's not finding the value. I manually added appSettings.config - Is there any special configuration needed?
var applicationId = ConfigurationManager.AppSettings["appId"].ToString();