Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The type initializer for <module name> threw an exception

Status
Not open for further replies.

sacsac

Programmer
Dec 10, 2000
177
GB
I have several applications targeting the .NET4 framework. All fine, except just one which is driving me crazy! When I deploy it on any PC other my own it throws the error "The type initializer for '<MyModuleName>' threw an exception". Does anyone know anything about this problem?
 
I had this exact same exception recently. I have a main app which loads several class libraries (DLL) and one of the libraries needed re-compiling. When I did, the application threw an 'object not set to an instance of an object' exception. I narrowed it down to an empty string (string = nothing) being passed into a method. The exception was thrown on line that read:
Code:
If StringValue = "" then

I hope yours is a similar problem and the above helps.

Keith.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top