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

Discussion in 'ASP .Net' started by Phil Sandler, Sep 2, 2004.

  1. Phil Sandler

    Phil Sandler Guest

    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
    Phil Sandler, Sep 2, 2004
    #1
    1. Advertising

  2. Phil Sandler

    Phil Sandler Guest

    Never mind. I shut down, got on the train and booted up, and it
    worked with no error. Hmm.

    (Phil Sandler) wrote in message news:<>...
    > 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
    Phil Sandler, Sep 3, 2004
    #2
    1. Advertising

  3. Phil Sandler

    calvinmann

    Joined:
    Jan 23, 2009
    Messages:
    1
    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!
    calvinmann, Jan 23, 2009
    #3
  4. Phil Sandler

    ChristophK69

    Joined:
    Jun 26, 2009
    Messages:
    1
    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!
    ChristophK69, Jun 26, 2009
    #4
  5. Phil Sandler

    Alex Richardson

    Joined:
    Jan 28, 2010
    Messages:
    1
    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.
    Alex Richardson, Jan 28, 2010
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page