CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jay Kimble -- The Dev Theologian

Philosophizing about the .Net religion

.NetCF SP3: TypeLoadException Solved! (AKA more reasons I hate Newsgroups)

Ok, so Tuesday, I blogged about my Compact Framework Problem (right here).  To re-cap, I upgraded my Dell Axim X30’s Compact Framework build to SP3 and an App I wrote for a client started throwing a TypeLoadException error and it was complaining about the Dataset class.

First of all, here’s what my problem was (and probably yours).  [I’m going to give this to you as clearly as I can].  Check your app very closely.  Check the main project and each sub project very carefully… does it target the Compact Framework; Check the project properties to make sure.  Next check the references in each project by right clicking on them and viewing properties.  The version number for all the standard DLLs (as shown in VS.Net should be 1.0.5000)  if not then you’re referencing a non-Compact Framework DLL (or this post is really old and you’re referencing the 2.0 Compact Framework <grin />).  To fix the problem remove the Desktop Framework reference and use a Compact Framework version instead.  Recompile and you should be done (unless you have a different problem).

This happens because SP1 and later do a better job of validating assemblies and they will let you know that something is messed up.


 Now, my gripe.  I had a couple people point to the newsgroups and say here’s your answer.  I was also asked why I hate newsgroups.  This post will probably get more hits than any newsgroup post.  Not only that but my post is not a discussion; it’s more in the vein of an FAQ entry (“Here’s your problem/solution”) versus a conversation (“Well, that didn’t work”).  Both have their place… there were a number of references in the newsgroups to search the group for a slightly different answer… <arrrggghhhh />!  Why can’t you link to the answer? 

Two final points
1) I’m not the only one with this problem there were a few others out there and none appeared to have gotten an answer that worked (hopefully my solution will work for you)…
2) The newsgroups did actually hint at the solution and in some cases came right out and told me, but the problem looked slightly different… It took me 2 days to resolve this with newsgroups… hopefully it won’t take others as long with my post here…



Check out Devlicio.us!

Our Sponsors

This Blog

Syndication

News

CodeBetter.Com Home
Current Threat level
Terror Alert Level