1

I recognized two issues in commenting (XML style) Visual C++/CLI generic functions. Typed functions behave as expected.

System configuration is Windows 7 and Visual Studio Premium 2013. The project is a C++/CLI project and outputs a DLL.

Description

If I "split" the function declaration over two lines, the comments will be displayed NOWHERE. Not in the same C++/CLI project, nor in C# projects using it and Visual Studios' Object Browser displays nothing, too:

/// <summary>
/// Does something with <paramref name="col"/>.
/// </summary>
/// <remarks>VS does not like me :-(</remarks>
/// <typeparam name="T">Types allowed derive from class <see cref="CClassA"/>. These (actually) are ...</typeparam>
/// <param name="col">Collection to do something with.</param>
generic<class T> where T : CClassA
    static void DoSomething(IEnumerable<T>^ col);

If the whole declaration is arranged on a single line, the comments only show up in the same C++/CLI project:

/// SAME COMMENT AS ABOVE
generic<class T> where T : CClassA static void DoSomething(IEnumerable<T>^ col);

Question:

Does anybody know, how to re-write the comment to show up in projects using the generic function?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Christian St.
  • 1,751
  • 2
  • 22
  • 41
  • Really no C++ to see, so corrected tags. – Deduplicator Sep 10 '15 at 10:56
  • I see no obvious repro for this problem. Focus on the .xml file that is generated when you compile with /doc. Ensure first that the XML comments appear in that file. Next focus on the location of the file, ensuring that the IntelliSense parser can find it. If you do any copying then make sure the .xml file is copied as well. – Hans Passant Sep 10 '15 at 11:51

0 Answers0