Archived
This forum has been archived. Please start a new discussion on GitHub.
TypeLoadException question
Hi!
I'm playing around with Ice and C# and the .net framework 2 beta.
Unfortunately, I receive a TypeLoadException ('Method 'getItem' in type 'MyApp.CMyInterfaceI' from assembly 'MyApp, ...' does not have an implementation).
The interface looks like
with an implementation like this:
Was the latest Ice version already tested against version 2 of the .net framework? What could I do to circumvent this problem?
cheers,
Stephan
I'm playing around with Ice and C# and the .net framework 2 beta.
Unfortunately, I receive a TypeLoadException ('Method 'getItem' in type 'MyApp.CMyInterfaceI' from assembly 'MyApp, ...' does not have an implementation).
The interface looks like
module MyApp { interface CMyInterface { CItem* getItem(); }; };
with an implementation like this:
namespace MyApp { public sealed class CMyInterfaceI : MyApp._CMyInterfaceDisp { public override CItemPrx getItem(Ice.Current current) { return something; } }
Was the latest Ice version already tested against version 2 of the .net framework? What could I do to circumvent this problem?
cheers,
Stephan
0
Comments
-
We haven't tested Ice against version 2 of .NET at this point. I have no idea why the loader complains. Can you use the object browser to have a look at the contents of the assembly and look for the missing method? That might get you a bit further.
Cheers,
Michi.0 -
Sorry, I forgot to write a comment about this. The object browser gives correct output for the function in question:
public abstract MyApp.CItemPrx getItem(Ice.Current __current) Member of MyApp._CMyInterfaceDisp
Should be correct, right?
Not sure if I made a mistake but even using a tie class doesn't seem to work in this case. When inheriting from _CMyInterfaceOperations and implementing the aforementioned function, the compiler complains that there is no function to override though having this in the object browser:MyApp.CItemPrx getItem(Ice.Current __current) Member of MyApp._CMyInterfaceOperations
Stephan0 -
stephan wrote:When inheriting from _CMyInterfaceOperations and implementing the aforementioned function, the compiler complains that there is no function to override
Hmmm... Sure looks like a compiler bug to me. Does this happen for all interfaces or only for specific types?
At any rate, I suspect that there is nothing we can do about this other than to wait for Microsoft to fix the compiler.
Cheers,
Michi.0