system.invalidoperationexception clr20r3


Ok, enough is enough. How do you fix a problem that cannot be defined?

Let me backtrack a little. I new version of insQuote data converter was deployed today. The setup program ran flawlessly, the DLL’s were put in place and the pretty icon was placed on the desktop. The same procedure that has been repeated by thousands of people with software since the dawn of msi_exec !

Launch the program, up comes the cool looking splash and WHAM! “This program has stopped working!” – no handled (or un-handled) exception, no calling of my error traps, just an unceremonious crash.

Cool, lets check the event log, nothing but a clr20r3 system.invalidoperation message. So what now?

Basic checklist

– are the DLL’s required the ones we shipped ? YES
– are all sub-dependant DLL’s present ? YES
– are there any UAC issues ? NO
– is the .Net framework installed correctly (client profile vs extended) ? YES
– are there any pending Windows Updates that could be causing the problem ? NO (but install the pending 28 anyway)
– has anyone in Google land had a similar problem ? YES – wow, lots of unanswered posts

Now whats next ? the error is unhelpful, we have been through the basics and so its time to approach it a little differently. The application in question uses a couple of third party components (see this post on preferred components) so maybe the issue is directly related…

I created a new vanilla project, .Net 4.0 and tested on the rogue machine. All good. So now introduce the DevExpress UI controls, deploy and test. All good. Now add in the ComponentOne Flexigrid, deploy and test. All good. That leaves only one left to test – SQLite.Net.

After installing the SQLite.Net package the mysterious problem went away.

So it turns out we know the following

– the error is directly related to a missing dependancy
– the error reporting for such events is abismal

The next step was to work out what caused the problem. After some more research it turns out to be Visual C++ 2010.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: