how to solve System.TypeInitializationException was unhandled exception in vb.net?

后端 未结 4 787
傲寒
傲寒 2020-12-19 16:44

I have created a vb.net console application when i am running the source code it will work fine.But when i am running the Executable file it is throwing an exeption like \

4条回答
  •  庸人自扰
    2020-12-19 17:19

    When I encountered this issue, the exception pointed to a line of code that was actually not related to the configuration item that was missing from the Web.Config file. Basically I was using a Constants.cs file to initialise settings from the Web.config file that were then used in the code. One of these constants was missing from the Web.config file and simply adding this setting to the Web.config file resolved the issue.

提交回复
热议问题