dotnet / dotnet/wpf

Configuration system failed to initialize

Open
#4,300 1 comment 1 reaction 1 assignee Claimed by @ryalanms View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Configuration-system-failed-to-initializ/1368580)._

---
[severity:It's more difficult to complete my work]
Create a . NET5.0 WPF application. In project properties\settings, add a random setting:
! [image.png] (https://aka.ms/dc/image?name=Bd1586d029f994298bff9e88e19b0884d637511539186637720_20210312-215157-image.png&tid=d1586d029f994298bff9e88e19b0884d637511539186637720)
And add code in MainWindow.xaml.vb:
```VB.NET
Class MainWindow
Sub New()

' 此调用是设计器所必需的。
InitializeComponent()

' 在 InitializeComponent() 调用之后添加任何初始化。
Dim a = My.Settings.Setting
End Sub
End Class
```
! [image.png] (https://aka.ms/dc/image?name=Bad35265fd9bf4c9fa5dc6b9ad63a01e0637511539974568955_20210312-215316-image.png&tid=ad35265fd9bf4c9fa5dc6b9ad63a01e0637511539974568955)
Then run. Throws System.Configuration.ConfigurationErrorsException:“Configuration system failed to initialize”
! [image.png] (https://aka.ms/dc/image?name=Bb210a1b4ddd7442486c900c62d88333b637511541046966987_20210312-215503-image.png&tid=b210a1b4ddd7442486c900c62d88333b637511541046966987)
Don't refer to the reproduce record. The recorder is broken that I can't do any reproduction when recording. Don't know why, but that's another bug not disscused here.

---
### Original Comments

#### Feedback Bot on 3/14/2021, 06:27 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.