TypeInitializationException thrown for Program class

后端 未结 13 828
醉梦人生
醉梦人生 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:12

    I've the same problem: runs program in MS VS 2015 and triggers an exception message:

    System.TypeInitializationException was unhandled
    Message: An unhandled exception of type 'System.TypeInitializationException' occurred in mscorlib.dll
    Additional information: Der Typeninitialisierer für "" hat eine Ausnahme verursacht.
    

    The question where source this exception? So, I started the EXE file and displayed the exception message dialog. Answer on "debug mode" with MS VS so become more information displayed about exception.

    System.IO.FileNotFoundException was unhandled
        Message: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
        Additional information: Die Datei oder Assembly "SIC, Version=19.2.6.3, Culture=neutral, PublicKeyToken=**************" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
    

    I go to this reference and analyse properties Property: "Copy Local" is on false - because before was a installed into GAC Solution: property "Copy Local" set on true and builds new assembly and works :-)

    Maybe this information helpful! So have a good day.

提交回复
热议问题