So I have an invoke code activity in my code that runs a VB script. This was working forever until I made some slight changes to the workflow. Now I am getting the error, “Invoke code: Exception has been thrown by the target of an invocation.” Any idea why? Thanks in advance
TargetInvocationException masks the real exception by telling you that it crashed during “a method invocation”, usually through
What you have to do is look at the InnerException property of the exception object (the TargetInvocationException object), this will give you the actual exception that was thrown, with a more useful stack trace.
Please check invoke methods in your VB script.
Does this exception that I am getting mean there is an error in my VB code? Or somewhere else? I still cannot figure this out
It will be in VB code.
Some method which you are invoking is not working.
I don’t believe I am invoking any methods. This same exact code (other than different indexes of an excel file) is working in another workflow. Very confused
Where can I go to see the TargetInvocationException object in order to see the actual exception with a more useful trace?