System.TypeInitialisationException

  • Thread starter Thread starter Stefan Richter
  • Start date Start date
S

Stefan Richter

Hi,

I developed a little program
that connects to a MS SQL Server to insert
some data.

On my PC it works perfectly,
but on all other PCs it throws an
System.TypeInitialisationException and doesn't start at all!

Before I was using ODBC to connect, now I changed to SQL Client,
but it's still not working.

Any ideas?

Thx,

Stefan
 
Found the answer online:
http://www.dotnet247.com/247reference/msgs/37/189441.aspx
[...]
I ended up logging a call with Microsoft to resolve this
and it turns out that the problem lies with attaching
custom icons to the forms... as soon as the icons are
removed it compiles fine with csc!

There is a workaround - the .resx files for the forms can
be compiled to .resource files using resgen.exe and then
compiled with csc. The downside of this is that it does
not meet my requirement of being able to compile the app
using only the .Net Framework - resgen is part of Visual
Studio.
Still, at least I know what the problem is now!
[...]
 
* "Stefan Richter said:
I developed a little program
that connects to a MS SQL Server to insert
some data.

On my PC it works perfectly,
but on all other PCs it throws an
System.TypeInitialisationException and doesn't start at all!

Before I was using ODBC to connect, now I changed to SQL Client,
but it's still not working.

Please post the questions to the groups it's related to. In your case,
that's the ADO.NET group. Your question's answer doesn't depend on
VB.NET.
 
Back
Top