Exception from HRESULT: 0x80131040









Background:
I just recently upgraded to Windows 10, and I must confess, the overall experience immediately got me. I love the fact that our good old start menu was back and better. The tile one was much of a controversy although I have been indifferent about it all the while. I particularly love Cortana, the search assistant who made me remember the office assistants that used to come with the office suite back then. The euphoria I experience was a perfect disguise, however, for the ambush that was ahead.


Issue:
I went ahead to open VisualStudio and launched the project I was currently working on. I pressed F5 to launch it, only to ram into a jam! The project I still successfully tested only a day before now threw an exception. From my experience, and this situation hasn't proved me wrong, every Microsoft upgrade always has a catch somewhere. This particular one forced me to begin to rectify a fault in an application that was initially 'bug-free' before my upgrade. The error message looked like this:

Server Error in '/' Application
Could not load file or assembly 'bts_school (1)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


Solution:
Well after lots of research and trials I simply resolved the issue by deleting the application's DLL file from the bin folder. I particularly noticed that for whatever reason, the system created a copy, hence the bts_school (1) seen above in the error message. I deleted the main DLL and the copies including the PDB files, then I rebuilt the solution. It worked after that.

I've since been wondering how a simple upgrade to Windows 10 went ahead to confuse VisualStudio, but I'm indeed glad to have my application up and running again!

Comments

Popular posts from this blog

Resize or Crop Image before Upload Using HTML5 File API

Get Creative With Data Tables: Row Click Events