I have .NET assembly with one public class and several private classes.
I am trying to register it for COM interop so that I can call it from VBA, using the following command:
regasm /tlb foo.dll /codebase
Subsequently, when I open up the .tlb
file in Visual Studio's "object browser", I see that the library does not expose any types.
Any thoughts?
I realize that there isn't mu开发者_如何学Pythonch specific information here, so if you let me know what would be diagnostically useful, I will try to provide.
I had to mark my public type with [ComVisible(true)]
.
Two things to help:
- I don't think that VS2008 object browser allows viewing of tlb files generated from .NET assemblies - I would recommend using iTripoli's Type Library Viewer to make sure that you are diagnosing the right problem;
- Try using the
/verbose
option, to see what kind of problemsRegasm
has encountered.
精彩评论