How to make application settings independent of .exe path?
问题 Suppose I want to move my app from c:\myapp.exe to d:\myapp.exe. It will loose all settings. How to prevent that? 回答1: Personally I use the registry to save and load my settings, so the location of my application isn't affected, but if you're using User.Config etc and want to fix the location, this might help: Can I control the location of .NET user settings to avoid losing settings on application upgrade? 回答2: It is an implementation detail of the LocalFileSettingsProvider class. Which has