How to prevent Visual Studio from requesting a .settings file update from app.config

We use the .settings file to store our application settings and use the default values ​​there, so we do not need to configure each individual setting. This was usually good.

However, during development, we often change values ​​in app.config, which means that when we open the .settings file, we always get a prompt . The value of the parameter "x" has been changed in the application. config file. Do you want to update the value in the .settings file? "

alt text

In our case, the right thing is to always select β€œNo” , otherwise the development parameters can easily slip into test and production environments. But since we are human beings, this is not always what happens. Even worse, the default button is Yes.

Is it possible to remove the human element a little and make Visual Studio not ask about it? Or should we abandon the use of default settings and define an explicit entry in app.config for each individual parameter in each separate environment?

+4
source share
2 answers

Options> Environment> Documents> Changes to automatic loading, if saved (check box)

+1
source

Does not work in VS2015. There is no such function to change auto-tuning.

Try this with StringCollection and read the MSDN why they don't want to fix this known issue. app.config will be changed and will look different than the settings.Settings file in the Properties folder.

The warning persists because the bytes are different, but they work correctly for each file being written. The designer loads this in one view and uses the data to write to your..exe.config file.

There is currently no work according to Microsoft and this is not a VS2015RC feature / fix. TESTED !!!

+1
source

All Articles