문제

How can one enable/achieve XML comments for C++ methods ala C# and VB in Visual Studio 2010? It appears this functionality isn't enabled/available by default.

Targeting initially managed C++ projects.

도움이 되었습니까?

해결책

This is not supported in C++ for VS2010.

다른 팁

Configuration Properties -> C/C++ -> Output Files -> Generate XML Documentation Files.

You will have to manually add all your xml documentation (/// doesn't auto-create a summary template for you). Also doesn't support paramref. http://msdn.microsoft.com/en-us/library/ms173501.aspx

To auto complete xml documentation stubs when /// is typed try CppTripleSlash - xml doc comments for c++ extension. It also has some basic intellisense to complete xml tags inside doc comments.

I know this is the old one, but everywhere I have looked everyone say's NOT SUPPORTED, need 3rd party tool or similar, none which is not the true. What you need to know is that XML Documentation is supported and is available in Visual Studio 2010, and there are only two things to know about it:

  1. Docs/Previous Versions / Visual Studio / XML Documentation / Recommended Tags for Documentation Comments: https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/ms177227%28v%3dvs.90%29

  2. In "C++ project properties / C/C++ / Output Files / Generate XML Documentation Files" set to "Yes (/doc)"

It will generate .xdc file for each source file containing documentation comments "///" and merge it into one .xml documentation file. And documentation works just fine later in other projects.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top