Ok, I have a strange problem. I have a DLL that defines a couple of
interfaces. They just have a few properties and a couple of functions in
them. Now, I create a new Windows Forms project and add a reference to that
DLL. Now, before I do anything, I run the project. A blank form pops up.
That's good. Now, I add the Implements line for one of the interfaces, which
automatically creates the property and function shells for me. But when I
try to run it again, I get the following error :
--------------
An unhandled exception of type 'System.TypeLoadException' occurred in
Unknown Module.
Additional information: Could not load type WindowsApplication3.Form1 from
assembly WindowsApplication3, Version=1.0.1994.17092, Culture=neutral,
PublicKeyToken=null.
---------------
Can anyone explain to me what this means, exactly, and why I'm getting the
error? Any help is appreciated. Thanks!
CodeMeister - 17 Jun 2005 22:06 GMT
Have you renamed the class Form1? If you have, you need to change your
startup object to use the correct form name. In C#, find your Main method
and edit the name of the class in the Applicatn.Run call. In VB.Net right
click on your project name and select properties. Change the name of the
startup object.
IHTH
Jon
> Ok, I have a strange problem. I have a DLL that defines a couple of
> interfaces. They just have a few properties and a couple of functions in
[quoted text clipped - 17 lines]
> Can anyone explain to me what this means, exactly, and why I'm getting the
> error? Any help is appreciated. Thanks!
Bagger - 17 Jun 2005 23:41 GMT
No, I didn't rename the class. That's the default name that VB.Net gives it.
The project is set to use Form1 as the startup object.
> Have you renamed the class Form1? If you have, you need to change your
> startup object to use the correct form name. In C#, find your Main method
[quoted text clipped - 27 lines]
> > Can anyone explain to me what this means, exactly, and why I'm getting the
> > error? Any help is appreciated. Thanks!
Bagger - 20 Jun 2005 16:35 GMT
I'm still hitting this problem. Does anyone have any idea what could be
causing this? Thanks!
> No, I didn't rename the class. That's the default name that VB.Net gives it.
> The project is set to use Form1 as the startup object.
[quoted text clipped - 30 lines]
> > > Can anyone explain to me what this means, exactly, and why I'm getting the
> > > error? Any help is appreciated. Thanks!
Scott W - 18 Jul 2005 22:59 GMT
Bagger, I ran into the same exception today. As it turns out, it was a faux
pas on my part, and the environment can't detect it...
The executable had the same name as the referenced DLL, IE Data.exe trying
to load Data.dll... builds fine, just can't run it...
Hope this helps
> I'm still hitting this problem. Does anyone have any idea what could be
> causing this? Thanks!
[quoted text clipped - 33 lines]
> > > > Can anyone explain to me what this means, exactly, and why I'm getting the
> > > > error? Any help is appreciated. Thanks!