COM registration without default constructor  
Author Message
MrJul





PostPosted: Common Language Runtime, COM registration without default constructor Top

After many hours of trying to understand why one class from my assembly didn't register in the CLSID key in the registry with COM export (of course project options where good, and regasm announces that all types were successfully registered), I found that classes without parameterless constructor can't register at all, and this without any error reported.

My question is : is this behaviour normal I don't mind having to add default constructors, but no error nor warning is a bit confusing.



.NET Development3  
 
 
nobugz





PostPosted: Common Language Runtime, COM registration without default constructor Top

Yes, it would have saved some of my time too. Please feel free to put your suggestion to the MSFT staff through Product Feedback. The problem is not that the classes in the assembly do not get registered, the problem is that the members do not get exported into the tool library. A very useful tool to troubleshoot problems like this is OleView.exe (File + View TypeLib). You'll find it hidden in the Common7\Tools\Bin folder.