Mono doesn't write settings defaults

Posted by Petar Minchev on Stack Overflow See other posts from Stack Overflow or by Petar Minchev
Published on 2010-04-06T08:47:17Z Indexed on 2010/04/06 8:53 UTC
Read the original article Hit count: 293

Filed under:
|
|

Hi guys!

Here is my problem. If I use only one Windows Forms project and call only - Settings.Default.Save() when running it, Mono creates a user.config file with the default value for each setting. It is fine, so far so good.

But now I add a class library project, which is referenced from the Windows Forms project and I move the settings from the Windows Forms project to the Class Library one. Now I do the same - Settings.Default.Save() and to my great surprise, Mono creates a user.config file with EMPTY values(NOT the default ones) for each setting?! What's the difference between having the settings in the Windows Forms Project or in the class library one? And by the way it is not a operating system issue. It is a Mono issue, because it doesn't work both under Windows and Linux. If I don't use Mono everything is fine, but I have to port my application to Linux, so I have to use Mono. I am really frustrated, it is blocking a project:(

Thanks in advance for any suggestion you have.

Regards, Petar

© Stack Overflow or respective owner

Related posts about c#

Related posts about mono