Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Daniel Lo Nigro
With application settings you can store any class that's serializable. The
framework handles serializing and deserializing for you. :). You just need
to tell it which type each setting is - not sure where this is in
MonoDevelop (or if it even has the tooling for it) but in Visual Studio
it's in the project properties on the "Settings" tab.

On Linux the settings file should be in the user's home directory - see if
it's in a hidden directory called ".settings"

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 29/12/2012 2:09 PM, "Hristo Pavlov"  wrote:

> 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 
> *To:* Hristo Pavlov 
> *Cc:* "mono-list@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 
> 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@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Hristo Pavlov
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 
To: Hristo Pavlov  
Cc: "mono-list@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  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@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-list
>
>___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Daniel Lo Nigro
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  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
>>
>>
>> On Sat, Dec 29, 2012 at 2:49 AM, Hristo Pavlov > > 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@lists.ximian.com
>> 
>> 
>> http://lists.ximian.com/**mailman/listinfo/mono-list
>>
>>
>>
>>
>>
>> __**_
>> Mono-list maillist  -  Mono-list@lists.ximian.com
>> http://lists.ximian.com/**mailman/listinfo/mono-list
>>
>>  __**_
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/**mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Danny
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


On Sat, Dec 29, 2012 at 2:49 AM, Hristo Pavlov mailto:hristo_dpav...@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@lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-list




___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Daniel Lo Nigro
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 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@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Ian Norton
Do your settings 'need' to be in an XML file? you can store things in the .net
registry with very little fuss for cross-platform work.

On Fri, Dec 28, 2012 at 03:49:40PM +, Hristo Pavlov 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@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread Alberto León
In windows you will have problems if the application is executed by a user
and the file is trying to save to a directory without permissions. Take
care with the user that is executing MonoDevelop or the app that should
save the file.


2012/12/28 Hristo Pavlov 

> 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@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>


-- 

http://stackoverflow.com/users/690958/alberto-leon
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform user settings files

2012-12-28 Thread edward . harvey . mono
> From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> boun...@lists.ximian.com] On Behalf Of Hristo Pavlov
>
> 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.

I think you'll find your best answer here:
http://clevertrove.com/SpecialFolderEnumeration/specialFolder_by_os.html

Looks like either ApplicationData or CommonApplicationData or 
LocalApplicationData or Personal

BTW, I noticed, IsolatedFileStorage isn't on the list.  I'm guessing you meant 
IsolatedStorageFile.  It looks like IsolatedStorageFile does something similar, 
including a level of security, but I don't know how much security it provides.  
I am guessing, if you actually want security, there's probably something better 
under System.Security.  But I really am just guessing.

I personally have a preference for JSON (javascriptserializer) over XML, but 
they both accomplish the same task of serialization.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Cross-platform user settings files

2012-12-28 Thread Hristo Pavlov
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@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Is Mono 3.0.1 support asp.net mvc3

2012-12-28 Thread Daniel Lo Nigro
Here's my MVC 4 site, which is working fine with Mono 3.0.2:
https://github.com/Daniel15/Website. Developed on Windows though (not with
MonoDevelop).

MonoDevelop not creating the Web.config file in the Views folder sounds
like a bug with the template. Perhaps it should be raised on the Mono bug
tracker.


On Sat, Dec 29, 2012 at 1:21 AM, angel colmenares <
angel.ignacio.colmena...@gmail.com> wrote:

>
> hi,
> about "The view 'Index' or its master was not found"
> monodevelop does not create Web.config file inside Views folder!, so you
> must add it manually, and  your mvc3 app will work.
> take a look at :
> https://github.com/angelcolmenares/KnockoutServiceStackDemo: mvc3 app
> developed with monodevelop on linux ( runs everywhere)
>
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Is-Mono-3-0-1-support-asp-net-mvc3-tp4657865p4657884.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono not load *.so shared library on server-pc

2012-12-28 Thread Kornél Pál

Hi,

On 12/28/2012 12:47 PM, Wang Song wrote:

hi, here is my stackoverflow link:
http://stackoverflow.com/questions/14064559/mono-not-load-so-shared-library-on-server-pc


Looks like your code is calling Path.GetDirectoryName with an empty 
string argument, like in Path.GetDirectoryName("");


As such the exception is most likely not related to .so loading, it just 
occurs before the .so is being loaded.


The stack trace seems to be printed by your application (not an 
unhandled exception printed by Mono) and you are missing the exception type.


You should use mono --debug to execute you app to get line numbers and 
use pdb2mdb tool to convert your .pdb debug info produced by VS to get 
line numbers for your app on Mono too.


Kornel
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Is Mono 3.0.1 support asp.net mvc3

2012-12-28 Thread angel colmenares

hi,
about "The view 'Index' or its master was not found"
monodevelop does not create Web.config file inside Views folder!, so you
must add it manually, and  your mvc3 app will work.
take a look at :
https://github.com/angelcolmenares/KnockoutServiceStackDemo: mvc3 app
developed with monodevelop on linux ( runs everywhere)




--
View this message in context: 
http://mono.1490590.n4.nabble.com/Is-Mono-3-0-1-support-asp-net-mvc3-tp4657865p4657884.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mono not load *.so shared library on server-pc

2012-12-28 Thread Wang Song
hi, here is my stackoverflow link:
http://stackoverflow.com/questions/14064559/mono-not-load-so-shared-library-on-server-pc

really thank you for the help!!
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list