I have a line of code that creates an IsolatedStorageFile
object.
IsolatedStorageFile isoFile = IsolatedStorageFile.GetStore(
IsolatedStorageScope.Roaming
| IsolatedStorageScope.User
| IsolatedStorageScope.Assembly,
null, null);
It works great and persists data between executions as I want it to, but when I move my exe
to a different folder, it doesn't receive the same storage location. I can move the exe
back to the original folder, and all of the data is available again.
How can I initialize the IsolatedStoreFile
so that it always gets the same storage location no matter what folder the exe
is in?
Update: In the documentation for this .GetStore
is states that
null lets the IsolatedStorage object choose the evidence.
Clearly, null
is using the URL of the exe
as the evidence.
How can I force it to use something else?
Here's the article I used to learn about this: DeveloperFusion