[Mono-list] Type conversion trouble
charlie at nunit.com
Tue Dec 16 12:56:24 EST 2008
I'm not sure about Mono, but at least in MS .NET the same thing
can happen if an assembly is loaded
a) from two different locations (i.e. a copy)
b) in both the load and loadfrom contexts
> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Robert Jordan
> Sent: Tuesday, December 16, 2008 7:22 AM
> To: Mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Type conversion trouble
> Wolfgang Schulze-Zachau wrote:
> > Cannot convert 'Amino.Common.IProjectNodeData' expression to type
> > 'Amino.Common.IProjectNodeData' (CS1503).
> > Now this is where the fun starts:
> > 1.) The error message doesn't make any sense to me. The two
> types are
> > exactly the same. There should be no need to do any conversion?????
> This error usually occurs if the same source file is included into
> 2 different assemblies. The types declared in this file will
> be totally different and incompatible. This is by design of
> .NET and C# compiler's type resolution.
> In your case, the file implementing "Amino.Common.IProjectNodeData"
> is probably duplicated and included by 2 or more assemblies.
> Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list