Skip to main content

"System.BadImageFormatException was unhandled" blues...

 

"System.BadImageFormatException was unhandled" is a nebulous error message.

image

Oh, by the way, unhandled shows up as a miss-spelling on my spell checker.

I really don't feel comfortable sharing how long I spent figuring this out but I am sharing the solution to possibly help someone else save some time.

This error did not mean anything to me.  At first blush, I suspected a version issue, installation issue with the sdk or a licensing issue.  What a joy!  Now the jump here may have something to do with past experience with this particular sdk.

After some time doing inspection and investigation and finding nothing I just happen click on the “Get General Help with this Exception”.

image

Now I click on these things occasionally but experience has shown me to be a waste of time more often than not.   I usually go to world’s help desk aka “The Google Machine” and sometimes Bing.  But when on occasion when I am thinking I just click around. 

image

Now the help content did not disappoint but this is not part of the help document but this is good content.

 

32-bit DLL….64-bit OS…..hmmm…something oddly familiar about this.  8 to 16 or more recently 16 to 32 same song different dance…or whatever the saying…

image

Changing the Platform Target on the project properties from any cpu to x86 did the trick.

Thanks community for the help!

Comments

Popular posts from this blog

Garage Door opener replaced

Our garage door opener has become intermittent, it has to go. It turned into a bit of a research project. We ended up installing a belt drive unit. The bracket was kind of a pain. It is suppose to be much more quiet. I started wearing gloves more for household projects. I love these gloves. Foam Nitrile Coated gloves. Check them out. I got them here. http://www.hardworkinggloves.com/index.php?main_page=product_info&cPath=3_13&products_id=120 Later...

Microsoft loses i4i appeal, faces Word injunction in three weeks

I just finished reading this article and it grinds on me. I cannot speak to the details of this patent but on the surface it looks to me like many software patents. They fail on the Non-Obvious test. Maybe it is because I understand software but what amazes me is far different from my wife who is in the medical field and even further from those I meet who are less educated. This does not even come close to impressing me!! I am not a M$ groupie as they have many unworthy patents too. The patent system is broke in this this area as well as others. This is not Dave over Goliath. It is Dave leveraging a broken system over Goliath. The same system Goliath leverages to maintain competitive advantages. Wrong is Wrong even when Dave does it. You can read it here... http://www.betanews.com/article/Microsoft-loses-i4i-appeal-faces-Word-injunction-in-three-weeks/1261523600
I saw how to do this on but the information was out of date. Download and install diffmerge. I used this link:  DiffMerge . Verify you can run it from the command line: Run the following commands from the git command line git config --global diff.tool diffmerge git config --global difftool.diffmerge.cmd 'sgdm "$LOCAL" "$REMOTE"' git config --global merge.tool diffmerge git config --global mergetool.diffmerge.cmd 'sgdm --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"' git config --global mergetool.diffmerge.trustExitCode true Now use the standard git commands for launching diffs and merges git difftool filename.ext git difftool branchname filename.ext git mergetool Note:  I had to perform these steps twice.  Once running the git command line under admin and once under user.  ...