[Mono-list] Cross-platform user settings files

Hristo Pavlov hristo_dpavlov at yahoo.com
Sat Dec 29 03:09:53 UTC 2012


Hi Daniel,
 
I didn't think of the application settings, thanks for mentioning them. I rarely use them because they are rather flat for my liking and .NET classes are serialized into XML quite trivially.
 
However I tested using the Application Settings on Ubuntu 12 and a normal user can indeed save changes to the user settings. 
 
I couldn't find where the file was saved on the Linux system btw which means that it will not be obvious for users i.e. they will not be able to edit the settings file manually. I will provide a way for them to edit the settings from the app so I guess I can live with the actuall physical file that contains the settings being hidden.
 
So what I am thinking now is that I may just save my settings class serialized as xml and saved as a single user setting value. I think this will solve my problem!
 
Thanks for your help,
Hristo.


________________________________
From: Daniel Lo Nigro <lists at dan.cx>
To: Hristo Pavlov <hristo_dpavlov at yahoo.com> 
Cc: "mono-list at lists.ximian.com" <mono-list at lists.ximian.com> 
Sent: Saturday, December 29, 2012 12:11 PM
Subject: Re: [Mono-list] Cross-platform user settings files


What's wrong with the built-in Application Settings features in the .NET Framework? I've never tested this with Mono, but it's been there since .NET Framework 2.0 so I assume it would work fine. The .NET Framework handles loading and saving the settings into an XML file, and gives strongly-typed access to all the properties. 

See http://msdn.microsoft.com/en-us/library/k4s6c3a0(v=vs.100).aspx



On Sat, Dec 29, 2012 at 2:49 AM, Hristo Pavlov <hristo_dpavlov at yahoo.com> wrote:

Hello,
>
>What is the recommended way to save user settings files from Mono across different platforms?
>
>For example I have an XML file with settings that I want to store somewhere. I thought the IsolatedFileStorage would be a good place but I have permission problems (read and write) on both Mac OSX and Linux.
>
>Would the solution require setting file access permissions during deployment or is there a place a user can always save a file?
>
>Where is the best location on Linux/Mac OSX to store such setting files?
>
>Regards,
>Hristo Pavlov
>
>_______________________________________________
>Mono-list maillist  -  Mono-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20121228/253d5f08/attachment-0001.html>


More information about the Mono-list mailing list