.NET assembly only PARTIALLY exposed to COM

  • Thread starter Thread starter Andrew J. Marshall
  • Start date Start date
A

Andrew J. Marshall

I built my assembly with the "Register for COM Interop" box checked.

I could reference my assembly and see the classes, but IntelliSense and the
Object Browser could not see the methods nor properties.

I used TlbExp and RegAsm with the same result.

How can I get IntelliSense and Object Browser to see the details of my
classes?

Thanks,
Andrew J. Marshall
MCP (Visual Basic)
Fairfax, VA
 
Sorry for replying to my own post, but ...

This article http://www.u2u.net/ArticlePage.aspx?ART=msdncominterop by
Patrick Tisseghem is awesome and it gave me my answer ...

You need to (in VB.NET)
* import System.Runtime.InteropServices
* and prefix the class declaration with
"<ClassInterface(ClassInterfaceType.AutoDual)>"
for example, <ClassInterface(ClassInterfaceType.AutoDual)> Public Class
Foo

Rebuild and, VOILA, IntelliSense and Object Browser are happy.

Andrew J. Marshall
MCP (Visual Basic)
Fairfax, VA
 
Back
Top