Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
535 views
in Technique[技术] by (71.8m points)

.net - regasm RA0000: No types were registered

I have a C++/CLI assembly (compiled for .NET 3.5 that comes with Windows 7). The assembly is marked as ComVisible(true). It contains 2 classes and 1 interface. Both classes are marked as ComVisible(false) so they shouldn't matter. The interface is marked with InterfaceType(ComInterfaceType::InterfaceIsIUnknown) and a specific GUID. This interface needs to be registered.

When I try to register this assembly using RegAsm.exe AssemplyName, I get this warning:

RegAsm : warning RA0000 : No types were registered

My assembly depends on 3 other assemblies which are in the same directory as my main assembly. 2 of them register with no problems and the 3rd is not marked as ComVisible.

Any ideas why I'm unable to register my assembly?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It looks like the assembly wasn't being registered because it didn't contain any classes available for registration, just the one interface. As soon as I added a dummy class to the assembly, the warning went away and the assembly got registered.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...