N
Nathan Baulch
I am so close to getting my manual COM interop classes to load correctly!
I have very slowly tracked down the problem to missing .override directives
on the classes in the IL generated from my assembly compared to that of
TlbImp.
I don't really understand why the directives exist in the first place
actually. TlbImp seems to be marking the extern methods as overriding
methods from an interface. This doesn't make much sense to me. If I try to
replicate it in my C# source by adding the "override" modifier, I get a very
predictable "There is no suitable method for override" error.
If I dump my DLL to IL, manually add in the .override directives, everything
works.
Please tell me there is a way to do this in C# and that I don't have to make
IL changes every time I need to build my assembly!
Nathan
I have very slowly tracked down the problem to missing .override directives
on the classes in the IL generated from my assembly compared to that of
TlbImp.
I don't really understand why the directives exist in the first place
actually. TlbImp seems to be marking the extern methods as overriding
methods from an interface. This doesn't make much sense to me. If I try to
replicate it in my C# source by adding the "override" modifier, I get a very
predictable "There is no suitable method for override" error.
If I dump my DLL to IL, manually add in the .override directives, everything
works.
Please tell me there is a way to do this in C# and that I don't have to make
IL changes every time I need to build my assembly!
Nathan