[Mono-dev] Where a portable application should store files?

Marek Safar marek.safar at seznam.cz
Tue Jun 16 05:47:47 EDT 2009


Hi,
> CruiseControl.Net currently stores all it's files, logs, configuration
> and work data in Path.CurrentDirectory. This causes problems not only
> on *nixes, but even on newer versions of windows. What should be used
> instead? Possible candidates are:
>
> Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData)
>   
No, normal user does not have write access here.

> Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData)
>   
Yes, when your data contain machine specific information or you want to 
keep them local.
> Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData)
>   
Yes, if you want your data to be shared between different machines under 
same user (see user profile roaming), it should not contain any machine 
specific settings.

I'd go with Environment.SpecialFolder.LocalApplicationData.

Marek


More information about the Mono-devel-list mailing list