COM Interop and Events.
I have created a public events interface (IEvents) that is registered with
COM using RegAsm. I then specify this interface as the event interface of
a class using the COMSourceInterfaces attribute. This works fine when the
public events interface is declared in the same assembly as the class which
will raise the events.
However, I want to be able to declare the events interface in a seperate
assembly (EventsAssembly) and use it in other assemblies. I created a new
assembly (TestAssembly), added a reference to EventsAssembly and compiled
the project. When I used RegAsm to register the types, I get the following
error "Could not load Type EventsAssembly.IEvents from assembly TestAssembly".
I realise that this is because IEvents is declared in a seperate assembly.
Is there any way I can declare a public events interface in a seperate assembly
or must all public interfaces be declared in the same assembly as the class
which implements them?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL