[MonoDevelop] Trouble with type conversions

Wolfgang Schulze-Zachau wolfgangs at manticoreit.com
Sun Dec 14 21:40:16 EST 2008


Hi all,

I am using MD 2 Alpha 2, compiled from source under Fedora 9. Have to
run it as root, but otherwise it works fine, except for the following
problem:
This code:
<snip>
27		[Test()]
28		public void Instantiation()
29		{
30			IProjectData nd = provider.getNewNodeData();
31			node = new ProjectNode((Amino.Common.IProjectData)nd);
32			Assert.AreEqual(0, node.WorkTypeID, "wrong worktype ID
instantiated");
33			Assert.AreEqual(0, node.ParentID, "wrong parent ID instantiated");
34			Assert.AreEqual(ProjectNodeType.Project, node.NodeType, "wrong type
instantiated");
35		}
</snip>

gives me the following errors:

/home/wsz/projects/mono/ProCosta/testProCosta/TestProjectNode.cs(31,32):
error CS1502: The best overloaded method match for
`Amino.Project.ProjectNode.ProjectNode(Amino.Common.IProjectData)' has
some invalid arguments
/home/wsz/projects/mono/ProCosta/libAProject/bin/Debug/Amino.Project.dll
(Location of the symbol related to previous error)
/home/wsz/projects/mono/ProCosta/testProCosta/TestProjectNode.cs(31,32):
error CS1503: Argument `#1' cannot convert `Amino.Common.IProjectData'
expression to type `Amino.Common.IProjectData'
/home/wsz/projects/mono/ProCosta/testProCosta/TestProjectNode.cs(31,32):
(equally named types possibly from different assemblies in previous
error)
/home/wsz/projects/mono/ProCosta/libABase/bin/Debug/Amino.Common.dll
(Location of the symbol related to previous error)
/home/wsz/projects/mono/ProCosta/libAProject/bin/Debug/Amino.Common.dll
(Location of the symbol related to previous error)

The strange thing is: there is no other named type from a different
assembly!. And all relevant code defines the correct interface as the
type. It get's even funnier: when I play around with various other bits
of code, the error sometimes goes away (unpredictably) and then returns
(also unpredictably).
Any pointers in this direction would be highly appreciated. I am also
more than happy to provide all necessary source code for this.

best regards
Wolfgang



More information about the Monodevelop-list mailing list