468,484 Members | 1,593 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,484 developers. It's quick & easy.

System.TypeInitialisationException

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

Nov 20 '05 #1
3 1555
Found the answer online:
http://www.dotnet247.com/247referenc...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!
[...]
Nov 20 '05 #2
Found the answer online:
http://www.dotnet247.com/247referenc...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!
[...]
Nov 20 '05 #3
* "Stefan Richter" <sp**@spammenot.com> scripsit:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Terrence | last post: by
2 posts views Thread by Scott | last post: by
5 posts views Thread by laks | last post: by
reply views Thread by NicK chlam via DotNetMonster.com | last post: by
reply views Thread by Stefan Richter | last post: by
2 posts views Thread by =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post: by
2 posts views Thread by gieforce | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.