"Method Write . . . does not have an implementation"

P

Phil Sandler

Hello all,

Thanks in advance for any help with this.

I am trying to get sample code to run from Michael Russell's
excellent article on removing whitespace:
http://www.codeproject.com/aspnet/WhitespaceFilter.asp

I have also tried his updated version, which can be found (in a zip
file) here:
http://www.laytoncity.org/public1/code/code.htm

To me it seems like the error message is wrong. Write() is
implemented! It's my understanding that if it weren't, the code would
not compile.

What am I doing wrong?

This is the error message I get when I follow the instructions
(directly cutting and pasting):

Method Write in type EQAsite.WhitespaceFilter from assembly EQAsite,
Version=1.0.1706.23088, Culture=neutral, PublicKeyToken=null does not
have an implementation.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Method Write in type
EQAsite.WhitespaceFilter from assembly EQAsite,
Version=1.0.1706.23088, Culture=neutral, PublicKeyToken=null does not
have an implementation.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[TypeLoadException: Method Write in type EQAsite.WhitespaceFilter from
assembly EQAsite, Version=1.0.1706.23088, Culture=neutral,
PublicKeyToken=null does not have an implementation.]
EQAsite.DefaultPage.Page_Init(Object sender, EventArgs e) +0
System.Web.UI.Control.OnInit(EventArgs e)
System.Web.UI.Control.InitRecursive(Control namingContainer)
System.Web.UI.Page.ProcessRequestMain()



Phil Sandler
 
P

Phil Sandler

Never mind. I shut down, got on the train and booted up, and it
worked with no error. Hmm.
 
Joined
Jan 23, 2009
Messages
1
Reaction score
0
Same problem

I appear to be having the same problem, I have followed all suggestions I have found (restarting machine, checking targeted .net versions) but nothing has helped. Has anyone else (besides the poster :p) come up with a similar problem and solved it? Any help would be greatly appreciated!
 
Joined
Jun 26, 2009
Messages
1
Reaction score
0
Hello,

I had the same problem, and found the reason:
The message "method x does not have an implementation" comes up if the assembly loader wants to load an outdated assembly with an old method implementation.

Have a look in your bin folder and locate the outdated assembly. Look at the assemblies "Created" date. One idicator is that it is older than the other assemblies.
Run the "ildasm" tool (from Visual Studio tools) and open the assembly. Look at the methods. You will probably find that the method signature is an outdated. Now close the tool and try to examine where the outdated assembly comes from. In my case the critical assembly was used by another component (assembly) I had referenced in my startup project.
If you don't have any idea, do a file search by file name of the critical assembly on the whole drive.
Finally, when you have found the source location of that outdated assembly, you should be able to find out, how and why is was build at that location. Try to rebuild that assembly, and then rebuild your main app. That should fix it.
Hope the explanation helped a bit, Good luck!
 
Joined
Jan 28, 2010
Messages
1
Reaction score
0
I also encountered this issue, but found this to be a case primarily associated with an 'incremental' build [the 'rebuild' buld configuration works fine]. For the incremental build, I attempted to ammend the dependency order with the sln file to enable the build to progress further, but this eventually failed on compiling the following project etc etc..

quote:
"The message "method x does not have an implementation" comes up if the assembly loader wants to load an outdated assembly with an old method implementation."

question:
If the assembly (x.dll) from which the tlb is created, has been updated, why isn't the tlb (x.tlb) triggered to rebuild, instead of attempting to use the old one. The dependency has been set correctly in the solution, so could be the problem? Any suggestions would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top