[Mono-list] Extension method not found

Christopher David Howie me at chrishowie.com
Wed Sep 1 01:16:46 EDT 2010


On 08/31/2010 11:49 PM, Dr_Asik wrote:
> I want to correct something I just said. ProjectB did not use any 
> other extension methods. I tried using another one and got the same 
> error. So I am unable to use any extension method from ProjectA in
> ProjectB (although ProjectA uses them without issues). However, the 
> decompilation error only happens with the method I listed; other 
> extension methods decompile fine.

Does ProjectB use *any* extension methods?  If so, do they work?

If not, check if ProjectB references System.Core.  If it does not then
this may be the cause of your compilation errors, since the attribute
that designates a method as an extension method is declared in
System.Core.  (The "this" syntax for declaring extension methods is
actually just syntactic sugar for the application of this attribute.)

If you can compile under VS without referencing System.Core then this
could be considered a Mono bug.

And, as a final note, if this doesn't work, or if you are already
referencing System.Core, then try to create a solution that reproduces
the problem with minimal code.  It's a bit hard to assist without having
something we can tinker with and try to fix.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.


More information about the Mono-list mailing list