System.TypeInitializationException Thrown

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Robert Porter (rhysliam_at_noemail.nospam)
Date: 02/13/05


To: microsoft.public.dotnet.framework.setup
Date: Sun, 13 Feb 2005 13:43:14 -0800

I have an application that runs fine in Visual Studio 2003 IDE, but when run compiled I get a "System.TypeInitializationException" thrown almost immediately, before my own code even starts to run.

 My program is run from the Main sub of a module and until recently ran fine after being compiled. Since I can't get it to happen in the environment I am having a tough time debugging it. It happens on my dev machine as well as customers systems, Windows 2000 and XP with and without SP2 etc.

 I am not using anything new since it last functioned, I have changed some properties of the DataGrid component, but even rolling those changes back does not stop the error from being thrown. It happens almost immediately after launching.

 I am putting this question here initially because I thought it might be something to do with installing the app. We use Wise Installer, v9 but I have even created a VS based installation with the same results. Installs fine, won't execute.

 WinForms app, using 2 COM based interop components, ADO.NET thats about it.

 Thanks

  

 Bob Porter



Relevant Pages