[Mono-list] Possible Bug
m.j.hutchinson at gmail.com
Sat Feb 13 18:35:47 EST 2010
I guess MonoDevelop should not provide completion for extension methods when
System.Core is not referenced. MD should also reference System.Core by
default in new 3.5+ projects. Please file bugs. Arguably gmcs should give a
better error message too, so please file a separate bug against gmcs for
On Feb 13, 2010 11:37 AM, "Abe Gillespie" <abe.gillespie at gmail.com> wrote:
Not sure if this is a bug or just some sugar that VS.NET does. If you
have extension methods in one assembly and then use those extension
methods in another, if you do not reference System.Core then the
compiler can't find those methods. I think the big problem is it's
hard to diagnose. MonoDevelop will happily offer code-completion for
those extension methods. However, when you compile, it fails.
Unfortunately the error info doesn't give you any sort of clue that
it's a missing System.Core reference and *NOT* a missing method.
VS.NET will happily offer code-completion *and* compile. Example of
an error message:
Messenger.cs(34,34): Error CS1061: Type
`Dimebrain.TweetSharp.Fluent.IFluentTwitter' does not contain a
definition for `AuthenticateAs' and no extension method
`AuthenticateAs' of type `Dimebrain.TweetSharp.Fluent.IFluentTwitter'
could be found (are you missing a using directive or an assembly
reference?) (CS1061) (Infrastructure)
The last part - "are you missing a using directive [...]" - is
misleading because that makes me think I need to add a reference to
TweetSharp. But what it really needs is the System.Core reference.
Hope that's useful.
Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list