regasm RA0000: No types were registered

不羁岁月 提交于 2019-11-26 21:53:27

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/8054039/regasm-ra0000-no-types-were-registered

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!