I was reading about the System.IO.IsolatedStorage namespace in .NET and found that I can use it to store a file to a location unique for my assembly or executable. For example, the following code:
using System.IO.IsolatedStorage;
public class Program
{
static void Main(string[] args)
{
IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForAssembly();
store.CreateFile("myUserFile.txt");
}
}
Creates the file "myUserFile.txt" at the following location:
C:\Users\Nick\AppData\Local\IsolatedStorage\bhxcjtkp.bpv\wbjkcolm.3br\StrongName.m2s0saaun2onmow3pd5pkml30lf2dobr\AssemFiles
And using IsolatedStorageFile.GetMachineStoreForAssembly()
creates a similar directory structure under C:\ProgramData\IsolatedStorage.
I can see the benefit of letting this API create a storage location for you (not having to think up a file path yourself). But I was surprised to see that there weren't any other files stored in IsolatedStorage from other third-party applications (at least not on my computer).
Instead, I found quite a few programs storing configuration files and such simply under C:\Users\Nick\AppData\Local. Does anyone know of a reason why software vendors might shy away from using IsolatedStorage? Or are they using a different API that stores files under AppData?