WPF Application fails on startup with TypeInitializationException

前端 未结 10 814
Happy的楠姐
Happy的楠姐 2020-12-17 09:05

I have a simple WPF application which I am trying to start. I am following the Microsoft Patterns and Practices \"Composite Application Guidance for WPF\". I\'ve followed

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 09:37

    For me, I had copied app settings over from another application into my app.config into a new section called "userSettings". However, there needs to be a "configSections" also added to the app.config which defines "userSettings". I deleted the userSettings section then edited the app settings and saved it. VS automatically creates the correct "userSettings" and "configSections" for you if they are absent.

提交回复
热议问题