In my Microsoft Surface project, I always get a lot of the following exceptions:
\'MuReSe.vshost.exe\' (Managed (v2.0.50727)): Loaded \'C:\\Windows\\assembly
I came across System.Runtime.InteropServices.COMException
while opening a project solution. Sometimes user doesn't have enough priveleges to run some COM
Methods. I ran Visual Studio as Administrator and the exception was gone.
I got this exception while coping a object(variable) Matrix Array into Excel sheet. The solution to this is, Matrix array Index(i,j) must start from (0,0) whereas Excel sheet should start with Matrix Array index (i,j) from (1,1) .
I hope you this concept.
Probably you are trying to access the excel with the index 0, please note that Excel rows/columns start from 1.
Your code (or some code called by you) is making a call to a COM method which is returning an unknown value. If you can find that then you're half way there.
You could try breaking when the exception is thrown. Go to Debug > Exceptions... and use the Find... option to locate System.Runtime.InteropServices.COMException
. Tick the option to break when it's thrown and then debug your application.
Hopefully it will break somewhere meaningful and you'll be able to trace back and find the source of the error.