简体   繁体   中英

Get isolated storage for assembly

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM