TypeInitializationException thrown for Program class

后端 未结 13 835
醉梦人生
醉梦人生 2020-12-10 23:30

My Windows Forms application was working earlier, however suddenly it stopped working. I am getting following exception:

13条回答
  •  我在风中等你
    2020-12-11 00:30

    In my case the reason was, that wasn't first one in config file.

    Only one element allowed per config file and if present must be the first child of the root element.

    Move the configSections element to the top in your config file.

    Hope it helps to someone.

提交回复
热议问题