I'm having trouble getting a Windows
vb program to read app.config and have been unable to locate any useful information. This code, located in the form_load curently,
runs as expected in the debugger:
Dim strProgramID AsString = ConfigurationManager.AppSettings("ProgramID")
MsgBox("strProgramID='" & strProgramID & "'")
But it
returns NOTHING when running the compiled version. It appears to give no reason for failure and I can only assume the problem is that it can't find the app.config file. I copied the file named "app.config" to the same folder as the executable because it was not there, but that did not appear to have resolved this.
I usually code web programs and this has never been a problem for me in that environment, and can find nothing online to explain why this should not work outside the debugger, so I am stumped! Can somebody please explain what I've overlooked before I start coding my own INI file class?