I recently posted regarding a TypeLoad exception in Microsoft.VisualBasic
http://forums.microsoft.com/msdn/ShowPost.aspx PostID=113878
It appears that my findings have highlighted a bug in VS2003 is this the case
Also my work around seems inconsistent sometimes its OK other times it doesn't have the desired effect. Any ideas
Thanks in advance.

Bug in VS 2003?
bishoycom
Would you like me to send you the project
Thanks
Glynn
IK81
The reply you got there still stands. When you create a new project make sure you are creating a Smart Device Project. Make sure you only reference netcf assemblies and not full framework ones (your own, msft's or 3rd party ones). Do not use the vb upgrade code utility since it will bring desktop assemblies in your project.
Bottom line, the typeloadexception you are seeing means that one way or another you are getting the desktop version of the VB.dll in your project.
Cheers
Daniel
dipak22101980
What are the configuration files you mention
Rburkhal
By the way, does it repros on fresh empty project without adding any references
Tony - Memphis
I doubt VS is adding references to wrong assemblies on it's own, so it must have been added at some point and persisted to the project configuration files. Looks like this configuration is not updated and you're getting bad reference back every time project is reloaded.
I would suggest looking into project configuration files to see if reference is present. Another way may be to start a fresh project from the same files.
Ohad Ninio
nantunes82
Thanks Daniel for the response,
This issue is driving me mad....
How can I be getting a desktop reference when as you say the project was created as a Smart Device Project and the only external reference is OpenNetCF. Serialization
Also why does shutting VS down and restarting cause the exception to occur (I've taken to hibernating my development machine just to be safe!!)
And why does my workaround cure the problem sometimes
Cheers
Glynn