I have a small test app with the code:
Configuration cf =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
cf.AppSettings.Settings.Add("EnNyNokkel", "EnNyVerdi");
cf.Save();

If i run my app from inside VisualStudio through debug my created
config file is created on startup of the program, but deleted when main
is finished!

If i however run the app from commandline or explorer, the
configuration file is not deleted when the application finishes.

Any good ideas why? Is this default debug settings?