I am getting an error message "Exception has been thrown by the target of an invocation" when my application is loading a vb.net 2005 form.
I am using vb.net 2005 with SP1, and framework version v2.0.50727
Any idea what could be causing this?
ThanksThursday, February 01, 2007 2:32 PM
This is thrown by the constructor, when calling InitializeComponent() routine.
However, thats all the information I am getting.
I did a cleanbuild and then a build, and it builds fine. But I still get the error, when I run the app.
This is a windows application, in vb2005 with SP 1
Any thoughts?Thursday, February 01, 2007 4:24 PM
When I step thru the code, it doesnt actually go inside InitializeComponent(), the procedure for that resides in the designer.vb page.
Are you saying that a component may be outdated?
Never came across anything like that in the past, but I have tried checking for out of date references, but cant find anything.Thursday, February 01, 2007 4:40 PM
You can still access the InitializeComponent method .. your form is a partial class and the method is hidden by default.
You'll probably find it is decorated with a DebuggerStepThrough style attribute, hence why you do not normally step into it. Remove it and you should be ok to step in at runtime.Thursday, February 01, 2007 4:59 PM
ok, the part of checking the InnerException property helped big time. The problem was resolved. I had added a project to my solution, and an assembly of the new project was being referenced. That assembly could not be found. So I created that.
However, I would like to clarify something for my own information.
Currently I have a solution file, that contains 5or 6 projects within the solution file. I add an existing project to my solution file, do a clean build (of the solution), then do a build (of the solution), and then do a "rebuild the solution". Shouldnt that process create the required assemblies of the projects within my solution?
Or do I have to manually create the assemblies, every time I add an existing project to my solution?
Thanks very much for everybody's help.Thursday, February 01, 2007 5:25 PM