简体   繁体   中英

When upgrading an Assembly, what's the best way to migrate files in Isolated Storage?

I have a .Net 2.0 C# application that occasionally gets updated and the Assembly Version and File Version are incremented. This is all working fine, but it also breaks storing xml settings files in Isolated Storage. (The xml files are generated by DevExpress XtraGridView.SaveLayoutToXml())

Is there a way to copy these files from the old folder in isolated storage to the new folder. ie From Appname\\1.0.0.0 to Appname\\1.0.1.0

Or is there a better place to store these xml files, that won't change when the File Version of the app changes?

I don't want to store these files in the application's .exe folder, as the app is not allowed to write to that folder in Vista without Admin privileges.

If you're using ClickOnce, you can use application-scoped isolated storage .

If you're not usingClickOnce, you can get the same effect by giving your application a strong name . A strong name guarantees the uniqueness of your assembly's identity by adding a public key token and a digital signature to the 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