Question

What is the difference between the magic paths in these namespaces:

Environment.SpecialFolder.LocalApplicationData

versus

Application.LocalUserAppDataPath

And

Environment.SpecialFolder.ApplicationData

versus

Application.CommonAppDataPath

etc...

Was it helpful?

Solution

They are not the same. The Application version of them is aware of ClickOnce deployment, adjusting the paths accordingly to keep them isolated.

OTHER TIPS

On Windows 7:

Environment.SpecialFolder.LocalApplicationData = C:\Users\username\AppData\Local
Application.LocalUserAppDataPath = C:\Users\username\AppData\Local
Environment.SpecialFolder.ApplicationData = C:\Users\username\AppData\Roaming
Application.CommonAppDataPath = C:\Users\username\AppData\Roaming

Local is only ever stored on the local machine. Roaming is copied to the domain server (when in a domain) and is then loaded back onto other machines in that domain when you log on.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top