• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

lijunle/Vsxmd: VS XML documentation -> Markdown syntax.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

lijunle/Vsxmd

开源软件地址(OpenSource Url):

https://github.com/lijunle/Vsxmd

开源编程语言(OpenSource Language):

C# 98.4%

开源软件介绍(OpenSource Introduction):

Vsxmd

AppVeyor NuGet

A MSBuild task to convert XML documentation to Markdown syntax. Support both .Net Framework and .Net Core projects.

Features

  • Provide full information from the XML documentation file.
  • Provide easy reading facilities - parameter table, link tooltip, etc.
  • Provide table of contents to type and member links.
  • Highlight code block through <code lang="csharp"> tag.
  • Reference System types to official MSDN pages.

Get Started

If you are using Visual Studio:

  • In Visual Studio, right click project name to open project properties window.
  • Switch to Build tab, in Output section, check XML documentation file checkbox.
  • Install Vsxmd package from NuGet.
  • Build the project, then a markdown file is generated next to the XML documentation file.

If you are using .Net Core CLI:

  • Open project's CSPROJ file, declare DocumentationFile property in PropertyGroup section. The path is relative to the project directory. MSBuild Reserved and Well-Known properties are also available for this property.
  • Run dotnet add package Vsxmd to install the the package to the project.
  • Run dotnet build to build the project and generate the XML documentation and Markdown files.

Vsxmd Options

There are some properties to customize the Markdown file generation process. They are all optional. If you want to use them, declare them in CSPROJ file's PropertyGroup section.

DocumentationMarkdown

It is used to specify the generated Markdown file path. It defaults to the XML documentation file name with .md extension, under the same folder as the XML file. Similar to DocumentationFile property, the path is relative to the project directory and MSBuild properties are available.

Example

<PropertyGroup>
    <DocumentationMarkdown>$(MSBuildProjectDirectory)\API.md</DocumentationMarkdown>
</PropertyGroup>

VsxmdAutoDeleteXml

A boolean flag to delete the XML documentation file after the Markdown file is generated.

Example

<PropertyGroup>
    <VsxmdAutoDeleteXml>True</VsxmdAutoDeleteXml>
</PropertyGroup>

Extend XML documentation

There are some extended features based on XML documentation. They are not described in XML recommended tags, but they are worth to use.

Highlight Code Block

To highlight code block in the Markdown file, declare the attribute lang in <code> tag and set it to a program language identifier.

Example

<code lang="javascript">
    function test() {
        console.log("notice the blank line before this function?");
    }
</code>

Programmatic API

This library provides the following programmatic API to convert XML documentation file to Markdown syntax programmatically.

Markdown File Demo

The best demo is this project's documentation file, Vsxmd.md. It is generated by this project itself.

Known Issue

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.

Credits

This project is initially inspired from a gist. But in the later releases, the implementation is rewritten.

License

MIT License.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap