Where did you see the message "exception has been thrown by the target of an invocation"? A small window popped up in Visual Studio, showing that message and highlighting a line of code in yellow, right? On that small window, there is a link saying something like "Show details for this exception". Click on it and a new window will open. Scroll to the Stack trace field and copy the text inside - there should be quite a bit of text so make sure you copy it all. Then scroll to the InnerException field and copy the exception name, message and its Stack trace. Then paste all of this here along with the highlighted line and its neighboring code.