A MSBuild task to convert VS generated XML document to Markdown syntax.
This project is initially inspired from a gist. But in the later releases, the implementation is rewritten.
- Provide full information from the XML documentation.
- Provide easy reading facilities - parameter table, link tooltip, etc.
- Provide table of contents and navigation links.
- Provide type and member anchors.
- Reference
System
types to MSDN pages. - Dynamic code highlighting through <code lang=""> tag
- Option to delete auto generated XMl configuration file
- In Visual Studio, right click project name to open project properties window.
- Open Build tab, in Output section, check XML documentation file.
- Install Vsxmd package from NuGet.
- Build the project, then a
.md
file is generated next to the XML document.
- The project property,
DocumentationMarkdown
, is used to specify the generated Markdown file path. - If not specified, it will be the same XML documentation file name with
.md
extension, under the same folder as the XML file.
<PropertyGroup>
<DocumentationMarkdown>'..\..\..\Readme.md</DocumentationMarkdown>
</PropertyGroup>
- Optional parameter if you want to delete the XML configuration file after generating your md file
<PropertyGroup>
<VsxmdAutoDeleteXml>True</VsxmdAutoDeleteXml>
</PropertyGroup>
- To use custom highlight code on your md jus use the attribute
lang
inside your<code>
tag
\\\ <summary>
\\\ <code lang="csharp">
\\\ \\Do some suff
\\\ </code>
\\\ <\summary>
- What you put into
lang
property will be interpreted by your markdown reader, so you can use any markdown highlight, likexml
,ruby
, etc.
This library provides the following public API to convert VS XML documentation to Markdown syntax programmatically.
Check this project's documentation file, Vsxmd.md, which is generated by this project.
The syntax for the list
comment tag is not well defined. It will be skipped during render.
If you have ideas, please open an issue.
MIT License.