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

Galaxy Outlaws Review

I just finished Galaxy Outlaws: The Complete Black Ocean Mobius Missions, 1-16.5 It was what I would classify as a good read.  It didn't compel me to read it.  There were a couple of times I found myself not being able to put the book down but I wasn't really compelled to get through quickly. You see I listen to most of my books when I run, drive, shop or doing house chores. I never found myself fighting the urge to run further, drive in circles, shop more often or do more house chores.  That is not to say it was a good read.  It just wasn't a compelling read. I didn't really like the magic vs. star drive thing for star travel. Now, with that said, it did grow on me and in the end, I tended to enjoy it more. The whole magic thing just felt like a get out of jail card through most of the series. The characters even talk about how Mort (wizard) bails them out of bad plans but I am saying it is more a get out of jail free card for the story.  Back yo...
Telerik Grid and Dynamic filtering Well let me say this is a tale of solving a problem for an existing system with poor test coverage.  Ok no test coverage.  No I didn't write it.  But yes I have to enhance it.  It isn't badly done code.  I mean there are places it could be improved.  Things I would have done differently.  New shining technologies we could and would use if it is was being done again but all in all it is straight forward and clean.  But it has no working tests, no comments.  I want to modify this code with minimal changes to minimize my risk and move on to more interesting things.  Oh did I mention the front end is built around Telerik.  You either love them or hate them.  For me it just depends on the problem but I usually just avoid them. Nice term what does it mean.... A grid with filtering drop downs: We want the filter drop downs with no selected filter value to filter the available option...