开发者

Change to Application Setting is not showing up at runtime

I have an application that's dealing with a required list of files it has to manipulate when run. I wanted to add a couple of files to this list. The list of files is stored in a setting. The scope of the setting is "Application". I added my two files to the list (via project properties -> settings), and saved everything. My files now appear there. My files are showing up in the app.config for this project under ApplicationSettings.

But when I run the application this line of code:

StringCollection requiredFiles = mySettings.UpdatePackageRequiredFiles;

Does not include my files.

mySettings is the right type; it's the project where the settings exist. Further, there is nowhere in the project UpdatePackageRequiredFiles is being written to and you can't write to an Application scope setting at run-time anyway (or so I understand).

开发者_C百科To spice up the mystery a little bit, there are 3 files appearing in the list whose existences are a complete mystery. They do not appear when viewing the settings in the designer, or in the source file. So what am I missing?


It turns out there is a configuration file with an identically named setting that the application was getting the list of files from.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜