By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,892 Members | 1,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,892 IT Pros & Developers. It's quick & easy.

Help

P: n/a
I'm getting the following error when I try to compile my project:

COM Interop registration failed. Type library exporter encountered an error
while processing 'WeedPlugin1.CWeedPlugin.add_MapSet(value), WeedPlugin1'.
Error: Type library exporter can not load type MapSetEventHandler (error:
System.TypeLoadException: Could not load type MapSetEventHandler from
assembly DotNetPlugin, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=968e71ee5ce24c2c.).
CWeedPlugin (a C# project) inherits from DotNetPlugin.CXYPlugin which is a
VB.NET project.

In VB.NET, the syntax is as follows:

Public Delegate Sub MapSetEventHandler(ByRef map As interop.MapObjects2.Map)

Public Event MapSet As MapSetEventHandler

In my C# project I'm using the following syntax:

base.MapSet += new MapSetEventHandler(this.OnMapSet)

Where OnMapSet is the function that is to handle the MapSet event.

If I uncheck the register for COM Interop checkbox in the C#'s project
properties, the project compiles fine. I just don't understand why it won't
compile when I check it. I used ildasm to look at the il being generated
when I compile the VB.NET assembly and it shows the class as such

..class auto ansi sealed nested public MapSetEventHandler
extends [mscorlib]System.MulticastDelegate

This part is a show stopper so if anyone has any ideas, I would sure
appreciate your help.

Steve

Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.