C++/CLI interface class documentation ?

Nov 22, 2010 at 2:50 PM

Hi all,

I'm trying to generate the documentation of a WCF services library, coded in C++/CLI with Visual Studio 2008.

I'm currently facing an issue with interface classes : no documentation is generated for them. Whereas the documentation for classes implementing the interfaces are generated as expected, I have not been able to generate documentation for my interfaces so far. This is embarrassing since it is exactly what I'm interesting in ...

I'm sure the .xml file is generated when I built the solution, and everything looks fine in this file, I can see stuff related to my interfaces so they are definitely in the xml file. But when I generate the documentation with Sandcastle Help File Builder, interfaces seem to be lost in space.

Has anyone ever tried to generate doc for interfaces written in C++/CLI ? I'm trying to know if I missed something, or if it is a bug either in Sandcastle itself, or the GUI tool.

When using the GUI tool, and launching the API filter stuff, there is something strange : I don't see any of my interfaces in the documented APIs tree, whereas the checkbox for interface is checked.

Any idea or suggestion would be appreciated,

Regards,

Michael

Editor
Nov 22, 2010 at 8:55 PM

Two typical causes of classes not showing up are that they are private or internal which aren't documented by default and the other is that the class is in the global namespace which is excluded by default.  Make sure the class is declared public and is within an explicitly declared namespace.  If one or the other is not possible, you may need to enable the DocumentPrivates and/or DocumentInternals project properties and/or include the global namespace via the NamespaceSummaries project properties (make sure the "(global)" namespace is checked in there).  Enabling documentation of private/internal members and/or including the global namespace will have the side-effect of including a lot of other stuff that you may not want so you'll need to use the ApiFilter property to remove the unwanted elements in that case.

Eric

 

Nov 23, 2010 at 8:52 AM

Well, indeed you are right, the "public" keyword was missing in front of all my interfaces. Now I get the expected results.

Thanks a lot for you reactivity and your sandcastle front end, impressive work.