[Mono-dev] System.Configuration 2.0 ApplicationSettings infrastructure.

Rafael Teixeira monoman at gmail.com
Sat Jun 17 18:46:35 EDT 2006


I don't think you even have to cook the filename in the same way as
MS, as AppSettings only need to be always retrievable from the same
place for the same exe and not collide with setting files from other
exes, hence the "exe name plus url" piece, but in linux we can for
something simpler, probably just

~/.config/<application-name>/<exename>.settings

Just my two cents,

On 6/17/06, Gareth Pearce <tilps.kilm at gmail.com> wrote:
> Hi,
>
> In the process of porting my little freeware puzzle game to mono, I've
> found that the .Net 2.0 ApplicationSettings infrastructure is currently
> quite incomplete. I've got one patch in bugzilla so that it at least
> doesn't crash under normal use, but even with that,
> LocalFileSettingsProvider is just a stub, it doesn't actually perform
> any persistence.
>
> I was considering fixing it all up so it worked nicely.  But wanted to
> a) check no one was already working in the area and b) check some design
> questions.
>
> The .Net documentation on the location of the user scoped settings file
> used by local file settings provider appears incorrect.  It states that
> user scoped settings files are found in User directory/Local
> Settings/Application Data/Company Name/Product Name/Version Number
> but in reality the product name is replaced with the <executable
> name>_Url_<hash of file location url or something >.
> I am wondering whether I should be aiming to match the hash so that the
> same program run under mono vs being run under .net will still find the
> same settings files.  It would seem like a difficult job without having
> access to the actual .net class library disassembly. The hash looks like
> base 32 encoding - 26 lower case letters and 6 digits - 32 characters
> gives 160bits, maybe SHA-1?  But still the question is of what.
>
> And finally, if I get this all done soon would it be likely to go in
> before the 1.2 release?  I'm hoping that Linux and Mac OS-X users can
> start using my puzzle game once mono 1.2 goes out and it would be good
> if their settings actually saved.
>
> --Gareth
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw



More information about the Mono-devel-list mailing list