Share via


Configuration system failed to initialize

Question

Wednesday, April 11, 2018 5:17 AM

Hi

A vb.net winform solution builds fine in debug configuration. When running the app I get exception below at the end. In the background I also get this;

Locating source for 'f:\dd\ndp\clr\src\BCL\system\threading\thread.cs'. (No checksum.)
The file 'f:\dd\ndp\clr\src\BCL\system\threading\thread.cs' does not exist.
Looking in script documents for 'f:\dd\ndp\clr\src\BCL\system\threading\thread.cs'...
Looking in the projects for 'f:\dd\ndp\clr\src\BCL\system\threading\thread.cs'.
The file was not found in a project.
Looking in directory 'c:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'c:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'c:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'c:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: f:\dd\ndp\clr\src\BCL\system\threading\thread.cs.
The debugger could not locate the source file 'f:\dd\ndp\clr\src\BCL\system\threading\thread.cs'.

How can I fix this please and get the app running?

Thanks

Regards

System.Configuration.ConfigurationErrorsException was unhandled
  _HResult=-2146232062
  _message=Configuration system failed to initialize
  HResult=-2146232062
  IsTransient=false
  Message=Configuration system failed to initialize
  Source=System.Configuration
  BareMessage=Configuration system failed to initialize
  Line=0
  StackTrace:
       at System.Configuration.ConfigurationManager.PrepareConfigSystem()
       at System.Configuration.ConfigurationManager.GetSection(String sectionName)
       at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
       at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
       at System.Diagnostics.DiagnosticsConfiguration.Initialize()
       at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
       at System.Diagnostics.TraceInternal.InitializeSettings()
       at System.Diagnostics.TraceInternal.get_Listeners()
  InnerException: System.Configuration.ConfigurationErrorsException
       _HResult=-2146232062
       _message=A section using 'configSource' may contain no other attributes or elements.
       HResult=-2146232062
       IsTransient=false
       Message=A section using 'configSource' may contain no other attributes or elements. (C:\Projects\MySolution\MyProject\bin\Debug\MyAssembly.vshost.exe.config line 69)
       Source=System.Configuration
       BareMessage=A section using 'configSource' may contain no other attributes or elements.
       Filename=C:\Projects\MySolution\MyProject\bin\Debug\MyAssembly.vshost.exe.config
       Line=69
       StackTrace:
            at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
            at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
            at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
            at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
       InnerException: 

All replies (2)

Thursday, April 12, 2018 2:08 AM ✅Answered

Similar to this case

https://stackoverflow.com/a/8791752/9125096

And the reply from Anthony just answered it.

 

 

Regards,

Fletcher

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].


Monday, April 23, 2018 9:36 AM

Hi Y a h y a,

What about this issue in your side?

Could you enable the Exception settings window, and then debug your app again?

Whether your app refer to certain dll/third party dll files which has no the source code in your side?

Best Regards,

Jack

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].