Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. i.e. 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.

like image 729
csjohnst Avatar asked Feb 23 '09 01:02

csjohnst


1 Answers

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.

like image 68
HTTP 410 Avatar answered Nov 01 '22 16:11

HTTP 410