views:

41

answers:

2

I made a bit of a namespace spelling mistake and I wish to correct it. My application currently uses Application.Settings to store a bulk of the user's information. If I refactor my namespace to be spelled correctly, will the application settings file essentially get wiped because it can't find the new namespace in it?

A: 

I've never tried this before, but it looks like you should be able to just change the app.exe.config filename to your app's new name and it will read it just fine, assuming you can script that into your deployment.

smoore
+1  A: 

I believe that ClickOnce will see this as a different application, so yes, the application settings would be "lost". I had to do this once myself, and I lost all the settings. Users had to install it as a new application and set up their personal inf all over again.

I never gt a definitive answer on why this was, but here's my guess:

If ClickOnce behaved otherwise, it would be too easy for someone to replace your app with a malicious one of their own, so from a security perspective, this makes sense.

However, I could be wrong. You could try it, and see. If the settings are lost, you can always revert (assuming you're using source control).

David Stratton