Application Settings

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a dll that saves user settings into user.config and it does the
save/retrive right. The problem is when the software starts/initializes, it
does not seem to read from the user.config, it gets the defaults that I
specified in the design time. Here is the code,

Settings settings = Settings.Default;

I want the dll to do the following,
if there's a user.config, read from it;
else read from the fefauts.

How can I do that? Thanks.
 
John said:
I have a dll that saves user settings into user.config and it does the
save/retrive right. The problem is when the software starts/initializes, it
does not seem to read from the user.config, it gets the defaults that I
specified in the design time.

Are you sure that you've saved the changed to the settings after they've
been changed?

You need to call the Settings.Save() method to write changes back out.

Also, with a DLL you should make sure that the user.config file you
expect to be used is actually used.

Pete
 
Back
Top