Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

Strange Problem with Interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bagger - 17 Jun 2005 17:30 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.