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 / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

TypeLoadException: Can't find property implementation.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredo - 13 Jan 2008 20:47 GMT
I'm getting the following error when I'm running my application (application
name changed for the example):

Unhandled Exception: System.TypeLoadException: Method get_ImageFile in type
MyApp.Plugin.DefaultImageFiles.JPEGImage from assembly
MyApp.Plugin.DefaultImageFiles, Version=1.0.2934.26057, Culture=neutral,
PublicKeyToken=null does not have an implementation.

My application is plugin-based. The class in question does have an
implementation of the ImageFile property with both a getter and setter. I've
verified that it is loading the proper version of the assembly from the
correct directory (it shows up in the Debug output with the path when it
loads the .DLL). I have verified, with reflector, that that copy of the DLL
does, in fact, have the implementation of the ImageFile property and yet, I
get the above exception when I try to call a method in the assembly.

The application, all of its DLLs, both plugin and otherwise, are all copied
to a single directory called "bin" by post-build events in all the projects
and the application is run in that directory.

JpegImage implements an interface called IMyAppImage. The interface
definition for the property is:

ImageFile ImageFile
{
   get;
   set;
}

(ImageFile is also a class defined in yet another assembly)

The implementation of the interface in JpegImage is simply:

public ImageFile ImageFile
{
   get
   {
       return _imageFile;
   }
   set
   {
       _imageFile = value;
   }
}

So, I'm stumped. Is there confusion being caused by the fact that the
property name is the same as a class name? I've never had that problem
before and I'd assume that the Size struct in System.Drawing would be
equally problematic if that were the case, since tons of classes implement
the property Size.

What else could be causing the problem?

Thanks.
Fredo - 13 Jan 2008 21:02 GMT
Nevermind. After hours of futzing with this, I finally discovered there was
a problem with one of the .DLLs. Please ignore the original post.

> I'm getting the following error when I'm running my application
> (application name changed for the example):
[quoted text clipped - 51 lines]
>
> 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.