Visual Basic (1)
Error message 'the key ... does not exist in the appSettings configuration section'
2 comments. Current rating: (1 votes). Leave comments and/ or rate it.
Question:I try to compile Visual C++ application that a friend mailed me. The code compiles fine, I can start the application, but when I open a form (dialog), the following exception is thrown:
"the key novelDesign.checked does not exist in the appSettings configuration section"
novelDesign is a radio button in that form. What's going on?
Answer:Apparantly your friend decided to have default values for the dialog's controls stored in an external .config file. His computer has the config file (typically named application.exe.config or application.config). You could run the application in the debugger and see where it breaks.
It is probably in the InitializeComponent() method, looking as shown in the code below.
Remove the line with the GetValue() reference and it will run fine.
My personal opinion is that default values for dialog controls do not belong in an external .config file anyway.