none
IsolatedStorageFile.GetMachineStoreForAssembly and Assembly Major Version change RRS feed

  • Question

  • Hello!

    IsolatedStorageFile.GetMachineStoreForAssembly() depends on assembly major version number.

    When major version number changes, user settings (stored in isolated storage) are lost. Is there a way to access old isolated storage?

    I tried to construct assembly evidence and pass it to GetStote() method by hand but did not succeed.

    Thank you.


    Vladimir Khil

    Wednesday, October 14, 2015 3:04 PM

Answers

  • Hi Ur-Quan,

    An assembly with new major version means it is a totally different assembly. I suggest you export your Isolated Storage data before assembly changing and import Isolated Storage data after changed.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Ur-Quan Friday, October 16, 2015 5:34 PM
    Friday, October 16, 2015 6:01 AM
    Moderator

All replies

  • Ur-Quan,

    [Is there a way to access old isolated storage?]

    You could give a strong name to your assembly. A strong name guarantees the uniqueness of your assembly's identity by adding a public key token and a digital signature to the assembly.
    https://msdn.microsoft.com/en-us/library/wd40t7ad(VS.80).aspx

    Best Regards,
    Li Wang

    Thursday, October 15, 2015 5:29 AM
    Moderator
  • Hello!

    My assembly is already strong signed and that is what causes the problem. Unsigned assemblies' storages dot not rely on major version number.


    Vladimir Khil

    Thursday, October 15, 2015 7:43 PM
  • Hi Ur-Quan,

    An assembly with new major version means it is a totally different assembly. I suggest you export your Isolated Storage data before assembly changing and import Isolated Storage data after changed.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Ur-Quan Friday, October 16, 2015 5:34 PM
    Friday, October 16, 2015 6:01 AM
    Moderator
  • Thank you!

    Vladimir Khil

    Friday, October 16, 2015 5:34 PM