C# console app throws System.TypeInitializationException at Program..cctor() at Program.Main(String[] args)

$1
=
$0
+
$1
$1 Bitcoin bounty has been announced by author.
$0 has been already awarded by author.
$1 remains available.
0

I have a console .NET application, let's call it MyProject, which runs scheduled using Windows Task Scheduler. I've noticed a command window that shows the following output in the black cmd window:

Unhandled Exception: System.TypeInitializationException: The type initializer for 
'MyProject.Program' threw an exception. ---> System.NullReferenceException: Object 
reference not set to an instance of an object.
at MyProject.Program..cctor()
--- End of inner exception stack trace ---
at MyProject.Program.Main(String[] args)

I am also seeing a modal dialog window with the following error message:

MyProject has stopped working. 
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available

I am confused by what Program..cctor() actually means. Please help!

0 answers - total earned - 0 BTC ($0 USD)

0
=
0
=
$0
Everyone, even non-registered users could send Bitcoin Tips to YOU if they are inspired by your answer!

Post Answer


Top 3 Tippers
Recent Tips

Will Bitcoin Tipping become a new Internet Culture?


Please share our story! THANK YOU!