Get isolated storage for assembly

289 Views Asked by At

I need at the end of installation create isolated storage for assembly of my application during installation to load initial settings for it. it isn't loaded during installation but I know name and full path of it.

I would like to use this method:

 IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, **assembly param**);       

But I don't know what to put in assembly param in documentation it has several overloads but I can't to call it correctly.

When application works we initialize isolated storage like:

IsolatedStorageFile.GetUserStoreForAssembly()

So I need to get the same folder but during installation.

Any ideas?

1

There are 1 best solutions below

0
On

The right way in this case to call the IsolatedStorageFile.GetStore like this:

var identity = new System.Security.Policy.Url(@"file:///fullpatch to your dll");
IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, identity); 

Knowing path of assembly we can initialize isolated storage for assembly.