UncleRonin
Well-known member
I've used application settings (My.Settings) in previous projects before and they worked out just fine. I use them now in my current project though and it's a total mess!
Previously I had my applications using the Exe.config file from within the application folder. I did nothing other than set up those application settings in the VS IDE and run my apps. When i wanted to change a setting I would do so manually and edit the Exe.config directly. Everything worked 100%.
This time, however, if i make a change to the Exe.config it is totally ignored and instead any changes have to be made to User.config in the user folder.
If I copy my application to a new PC with just the local Exe.config and I specify the settings there before running it, why aren't these settings used by the application? Instead the defaults are always used and no user.config even exists until My.Settings.Save is called. If I delete the local Exe.config then the application throws an error because it can't load the config! What's going on here? If there is no actual point in using the local Exe.config then why does it complain about it being missing?
Ideally what I want to do is use the local Exe.config ONLY. Access to it is not restricted and it simplifies the basic configuration process since all the database locations and communication settings are specified there. If I can't change the settings in the local Exe.config what is point of it's existence??
I know there are a whole bunch of .configs scattered all over the place and there is a precedence to them but there must be a way of saying 'Listen here, you lot back off' and then only the one very specific, very accessible and very logical .config is used. The same settings are used by all users but they are modifiable.
To me the defaults are there for the first use only and the local configs are the ones that should be used.
This is seriously driving me insane!
I've reached the point where I'm going to scrap the application settings and just use a basic XML file that does the same thing because things are just not working out...
Help me #(
Previously I had my applications using the Exe.config file from within the application folder. I did nothing other than set up those application settings in the VS IDE and run my apps. When i wanted to change a setting I would do so manually and edit the Exe.config directly. Everything worked 100%.
This time, however, if i make a change to the Exe.config it is totally ignored and instead any changes have to be made to User.config in the user folder.
If I copy my application to a new PC with just the local Exe.config and I specify the settings there before running it, why aren't these settings used by the application? Instead the defaults are always used and no user.config even exists until My.Settings.Save is called. If I delete the local Exe.config then the application throws an error because it can't load the config! What's going on here? If there is no actual point in using the local Exe.config then why does it complain about it being missing?
Ideally what I want to do is use the local Exe.config ONLY. Access to it is not restricted and it simplifies the basic configuration process since all the database locations and communication settings are specified there. If I can't change the settings in the local Exe.config what is point of it's existence??
I know there are a whole bunch of .configs scattered all over the place and there is a precedence to them but there must be a way of saying 'Listen here, you lot back off' and then only the one very specific, very accessible and very logical .config is used. The same settings are used by all users but they are modifiable.
To me the defaults are there for the first use only and the local configs are the ones that should be used.
This is seriously driving me insane!
I've reached the point where I'm going to scrap the application settings and just use a basic XML file that does the same thing because things are just not working out...
Help me #(