Reinhard Reinhard - 1 year ago 206
C# Question

Visual Studio: reset user settings when debugging

In a C# Winforms-App I have several user settings stored.

Is there an easy way to clear those settings each time I start debugging the project from Visual Studio 2008?

Otherwise it always starts up with the settings from the last debug-session.

Answer Source

Add a pre-build action to delete:

%USERPROFILE%\Local Settings\Application Data\[AppName]\...\[Version]\user.config

or if your version number changes alot just delete

%USERPROFILE%\Local Settings\Application Data\[AppName]\

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download