473,385 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

TypeLoadException: Can't find property implementation.

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.

Jan 13 '08 #1
1 5464
Nevermind. After hours of futzing with this, I finally discovered there was
a problem with one of the .DLLs. Please ignore the original post.
"Fredo" <fr***@hotmail.comwrote in message
news:Et******************************@giganews.com ...
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.

Jan 13 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Stegano | last post by:
I am learning C Programming after working with Java for 5 years. I want to know where can I find the source files for C language itself. For example strcat is a function, which concatenates two...
9
by: Desi Haker | last post by:
Hi there, I am trying to compile free C code from internet using cl(MSVC 7.1). This program use graphics.h header file. Unfortunatly this file is not standard C file. So, can any one help to...
22
by: Tera | last post by:
can you please give me the link ?
5
by: Jeroen Ceuppens | last post by:
I need to put a new node at the end of the tree, that end is not te lowest in de list but the deepest (the one with the most + before it) Node A Node 1 Node 2 Node 3 Node 4: Deepest Node B:...
1
by: jack | last post by:
Hi all, After create a component, I can't find any validator. I searched all the properties. There was no such kind of property. Does anyone here can help me out? Thank you in advance jack
6
by: bobueland | last post by:
The module string has a function called translate. I tried to find the source code for that function. In: C:\Python24\Lib there is one file called string.py I open it and it says
4
by: W03L | last post by:
Hi. I created a CLR windows forms application and can't find alignment property for listBox to make it auto align to a top. For other components like progressBar, richTextBox there is also no...
1
by: ofiras | last post by:
In bitmap, how can I find the nearest pixel (pixel 1) to a specific pixel (pixel 2) that has different color from pixel 2? Or how can I find a pixel in a specific distance from pixel 2 (like a...
6
by: Geon. | last post by:
hi everyone! when i install pysqlite i meet bellow error. ( use easy_install and source code building same problem ) ld: Can't find library for -lpython2.5 what mean this message? and what...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.