unhandled exception of type 'System.TypeLoadException'

G

Guest

Full error -

An unhandled exception of type 'System.TypeLoadException' occurred in
myApp.exe

Additional information: Could not load type
Microsoft.VisualBasic.MsgBoxResult from assembly Microsoft.VisualBasic,
Version=7.0.5000.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A.

This error occurs whenever i call a sub routine. I fixed this by
re-installing the .net framework, but after a few hours or so, it happens
again. This is only occuring in compact framework and not the desktop
framework.

Has anybody got any ideas what the msg means, and how to get around it? its
driving me insane.

Thanks
 
D

Daniel Moth

You are referencing the desktop MS.VB.dll rather than the CF one. How you
got in that situation I am not sure (maybe you used the upgrade vb6 code
wizard which is not smart enough to know it is in a CF project) but you can
remove the reference from your project (references and referencepath) and
try again.

As an aside why not use the System.Windows.Forms.MessageBox.Show instead of
legacy functions like MsgBox...

Cheers
Daniel
 
G

Guest

thanks for the quick reply..i did have a referance to the vb6 upgrade code,
but i removed this and it still isnt working. Iv tried running the project on
another machine and it compiles and runs fine. Also what gets me is that i
made a brand new smart device app, created a form with a button, that when
pressed fired a sub routine that popped up a msgbox. This also fell over with
the same error.

Thanks again.
 
G

Guest

iv re-installed it several times, and when i shut my pc down or after a few
hours, the problem re-occurs. Iv searched hi and low for any hint or answer,
and nothing.

thanks
 
G

Guest

anybody else and ideas?

sam.cartner said:
iv re-installed it several times, and when i shut my pc down or after a few
hours, the problem re-occurs. Iv searched hi and low for any hint or answer,
and nothing.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top