[Mono-list] Cross-platform user settings files

Daniel Lo Nigro lists at dan.cx
Sat Dec 29 02:54:20 UTC 2012


The App.config is per-application, but .NET also has built-in functionality
to support per-user settings. These are stored in XML files in the user's
AppData folder (C:\Users\[Username][AppData\Local\[Company Name] on
Windows). See
http://stackoverflow.com/questions/1075204/when-using-a-settings-settings-file-in-net-where-is-the-config-actually-stored

You create these similarly to how you create application-level settings (in
Visual Studio: Right-click project → Properties → Settings tab → Add a new
setting and set scope to User).


On Sat, Dec 29, 2012 at 1:23 PM, Danny <dgortonii at gmail.com> wrote:

> The built-in app.config features work fine cross-platform.  Even custom
> configuration sections and all of that.  Our system uses them extensively
> for system composition (ie: defining which components should be started at
> runtime) on both .NET and Mono.  But that type of setting setup is
> per-application; it doesn't make an ideal per-user configuration system
> unless you create your own construct within it. Totally feasible, but
> probably not what the OP was getting at.
>
>
> On 12/28/2012 08:11 PM, Daniel Lo Nigro wrote:
>
>> 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<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
>> <mailto:hristo_dpavlov at yahoo.**com <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
>>     <mailto:Mono-list at lists.**ximian.com <Mono-list at lists.ximian.com>>
>>     http://lists.ximian.com/**mailman/listinfo/mono-list<http://lists.ximian.com/mailman/listinfo/mono-list>
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/**mailman/listinfo/mono-list<http://lists.ximian.com/mailman/listinfo/mono-list>
>>
>>  ______________________________**_________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/**mailman/listinfo/mono-list<http://lists.ximian.com/mailman/listinfo/mono-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20121229/df049cb4/attachment.html>


More information about the Mono-list mailing list