0

How do you read the default values from the appName.exe.config file? My application only reads these values on first installation. Subsequently, it reads the updated values sitting in the user.config file. Please assist. Thanks

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by kumika
0

Are you talking about the values accessed via My.Settings? If so, please post your code. Check if your settings are defined with Application or User scope.

0

(AppInstallation is set to True in the App.config file)

If My.settings.AppInstallation=True Then

If File.Exists(f1name) Then
File.Delete(f1name)
File.Copy(f2name,f1name)
End if

My.Settings.AppInstallation=False
My.Settings.Save

End If

Properties are set to:
GenerateDefaultValue: True
Roaming: False
Scope: User

So on every installation I want the executable file to pick up a TRUE value for Appinstallation (from an upgraded appName.exe.config file) in order to delete the file, if it exists. and when an app is run/launched it should pick up a FALSE value. But that does not seen to happpen. The .exe.config is always negative unti I delete the user.config file.

_______________________________________________________________

Are you talking about the values accessed via My.Settings? If so, please post your code. Check if your settings are defined with Application or User scope.

Edited by Dani: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.