Jes Gudiksen
Jes Gudiksen

Reputation: 452

Updating Windows .net Program with installer

I created a small simple Windows program in Visual Studio, the i added a Setup project to the solution. Now i can install my program, and when i update something in the Windows program i can quickly build a new installer, however i got 1 problem. My windows program contains a settings file and when i Uodate/Reinstall my settings file is reset, How can this be avoided, i want to be able to update my program from a setup file without resetting the settings file ?

So anyone plz help me or point the right direction :)

Upvotes: 1

Views: 144

Answers (1)

SF Lee
SF Lee

Reputation: 1777

I believe you can achieve what you want by changing the settings file's property in the VS setup project to the following:

Transitive = False

And if you want the file to remain there even after uninstallation, then set the following property for the file as well:

Permanent = True

Warning: Setting the Transitive property mentioned above may have other less than desirable side effects. Please see http://msdn.microsoft.com/en-us/library/928tb19t%28v=vs.71%29.aspx for more information.

Another alternative is to add a Condition to the file in the setup project, as described in the following link:-

Visual Studio Setup Project conditional if File Exists

Upvotes: 1

Related Questions