views:

352

answers:

3

Ok, I have a ClickOnce app that I'm testing and I ask the user for a couple of pieces of information the first time they use load the app; Customer Id and Name. I then set the Properties so that they'll be saved across sessions. The property is Properties.Settings.Default["Customer ID"] and similar for name.

So I uninstall the application through control panel and reinstall the application but the settings are still there! I go and find all directories for my application and delete out the settings but the application acts like it still has them. I can even step through the debugger and see that they are still there.

How do I get rid of them all? This is very frustrating since it makes it almost impossible to test new data and to debug any first time installs.

Thanks...

A: 

I believe the user config values are stored in this location:

%APPDATA%\<AppName>\<AppName><AppConfigName_GUID>\<AssemblyVersion>\user.config

Have you checked there?

Peter Lillevold
yeah, that's my point...I got rid of all of that and they're still hanging around somewhere.
scottygpackfan
Ah, ok. When you uninstall, have you checked that everything is gone from the ClickOnce application cache?
Peter Lillevold
Believe it or not, yes! Now you see why I'm going batty over here! :)
scottygpackfan
A: 

ok, in case anyone has the same problem in the future. I had set the properties in Visual Studio through the Settings.settings editor. I removed them and everything was normal again...

scottygpackfan
A: 

In answer to the general problem of removing settings when the program is reinstalled, you could add unique peice of data as well, such as the date of the executable, its checksum of something similar.

Then check that against the saved data when you program starts. If they dont match, its a reinstall and you can delete the stored data.

JohnnyJP