Code highlighting

I use isolated storage using the IsolatedStorageFile.GetMachineStoreForAssembly () method to store my application settings.

After my application was already deployed, I bought a digital certificate to sign my software. However, the new version with the certificate cannot read the old settings file. Presumably this is due to the fact that the signing has changed the application identifier.

How can I access the old settings that were written from the old version (which was unsigned)? Is it possible to somehow get the repository of the Old old assembly by passing the old identifier?

+6
source share
1 answer

A car store is identified by an application identifier , not just a name .
Your publicKeyToken will be different after you have signed your code.

Literature:
http://msdn.microsoft.com/en-US/library/system.io.isolatedstorage.isolatedstoragefile.getmachinestoreforassembly(v = vs .80) .aspx http://msdn.microsoft.com/en-us/library/ b0yt6ck0.aspx

  • Edit -
    This is one of the downsides of isolated storage. I do not use it for permanent settings that cannot be re-entered if necessary. For longer storage, I create a folder for my application in the ApplicationData Environment.GetFolderPath(ApplicationData) folder and save my files there.

As I said, I found this article , which can sometimes be used to find a folder if you know the file name.

0
source

Source: https://habr.com/ru/post/947958/


All Articles