How to generate XML documentation in VC++?

I wrote a class library that I would like to add XML documentation. I added the <summary> and <param> tags in the source files in my lib. They appear in intellisense inside those files only. When I start a project using my library the documentation doesn't appear.

I added /doc to the command line of the library.

I know that you have to run xdcmake.exe to convert the xdc files to xml but there is supposedly a way to set VS to do this automatically in the property pages. I couldn't find any examples of how to do this though.

Any ideas what I should do?
Here's a rough example of what i'm trying to do,

mydll.h
1
2
3
4
5
6
7
8
9
class MYDLL_EXPORT Window
{
public:
    HWND Create(HWND parent);

protected:
    HWND _window;

};


mydll.cpp
1
2
3
4
5
6
/// <summary>Creates the window.</summary>
/// <param name="parent">The parent window.</param>
HWND Window::Create(HWND parent)
{
     ...
};


This documentation appears in intellisense in all other source files in my DLL project but not in any project that actually uses the DLL.

I figured out how to generate the XML file. Both the dll and xml have the same file name and are located in the same folder yet still I don't see the documentation. What do I do with the xml file?

If I put the documentation in "mydll.h" instead then I can view it in other projects as desired even without generating the xml file. Besides adding a lot of clutter to my headers is there anything wrong with doing it this way?
Last edited on
Topic archived. No new replies allowed.