Bei der Verwendung von My.Settings bekomme ich sofort nach dem Start des Debuggens diese Fehlermeldung:
Configuration system failed to initialize
Spoiler anzeigen
Ich habe jetzt noch keine Ahnung warum das auftritt. Bisher hatte ich noch nie Probleme mit My.Settings
Als Verdacht käme mir am ehesten Schreibrechte auf den Ordner in den Sinn.
Hat jemand eine Idee, was es sein könnte, und wie ich es umgehen kann?
Configuration system failed to initialize
System.Configuration.ConfigurationErrorsException
HResult=0x80131902
Nachricht = Configuration system failed to initialize
Quelle = System.Configuration.ConfigurationManager
Stapelüberwachung:
bei System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
bei System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
bei System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.RefreshConfig(String sectionName)
bei System.Configuration.ConfigurationManager.RefreshSection(String sectionName)
bei System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
bei System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
bei System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
bei System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
bei System.Configuration.SettingsBase.get_Item(String propertyName)
bei System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
bei System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
bei SDG2X.My.MySettings.get_Coil1() in C:\Users\ME\source\repos\SDG2X\My Project\Settings.Designer.vb: Zeile62
bei SDG2X.Form1.Form1_Shown(Object sender, EventArgs e) in C:\Users\ME\source\repos\SDG2X\Form1.vb: Zeile302
bei System.Windows.Forms.Form.OnShown(EventArgs e)
bei System.Windows.Forms.Form.CallShownEvent()
bei System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
bei System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Diese Ausnahme wurde ursprünglich von dieser Aufrufliste ausgelöst:
[Externer Code]
Innere Ausnahme 1:
ConfigurationErrorsException: Unrecognized configuration section system.diagnostics. (C:\Users\ME\source\repos\SDG2X\bin\Debug\net6.0-windows\SDG2X.dll.config line 8)
HResult=0x80131902
Nachricht = Configuration system failed to initialize
Quelle = System.Configuration.ConfigurationManager
Stapelüberwachung:
bei System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
bei System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
bei System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.RefreshConfig(String sectionName)
bei System.Configuration.ConfigurationManager.RefreshSection(String sectionName)
bei System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
bei System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
bei System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
bei System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
bei System.Configuration.SettingsBase.get_Item(String propertyName)
bei System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
bei System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
bei SDG2X.My.MySettings.get_Coil1() in C:\Users\ME\source\repos\SDG2X\My Project\Settings.Designer.vb: Zeile62
bei SDG2X.Form1.Form1_Shown(Object sender, EventArgs e) in C:\Users\ME\source\repos\SDG2X\Form1.vb: Zeile302
bei System.Windows.Forms.Form.OnShown(EventArgs e)
bei System.Windows.Forms.Form.CallShownEvent()
bei System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
bei System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Diese Ausnahme wurde ursprünglich von dieser Aufrufliste ausgelöst:
[Externer Code]
Innere Ausnahme 1:
ConfigurationErrorsException: Unrecognized configuration section system.diagnostics. (C:\Users\ME\source\repos\SDG2X\bin\Debug\net6.0-windows\SDG2X.dll.config line 8)
Quellcode
Ich habe jetzt noch keine Ahnung warum das auftritt. Bisher hatte ich noch nie Probleme mit My.Settings
Als Verdacht käme mir am ehesten Schreibrechte auf den Ordner in den Sinn.
Hat jemand eine Idee, was es sein könnte, und wie ich es umgehen kann?