Skip to content
| Marketplace
Sign in
Visual Studio>Tools>CsToMd
CsToMd

CsToMd

dadhi

|
548 installs
| (0) | Free
Generates Markdown documentation file from the input C# file by parsing the `/*md`, `md*/`, "//md" comments
Download

CsToMd

  • CsToMd
    • The Idea
    • Visual Studio extension
      • How to use

The Idea

The idea is to have a normal C# .cs file with the special comments /*md, md*/, and //md which will be stripped when converting the file into the respective Markdown .md file. There are a couple of additional features, but this is basically it.

Now you have the documentation always up-to-date with the runnable samples in the normal .NET Test library project with NUnit, XUnit, etc.

You may check the DryIoc documentation project for the real-world case example.

The additional features:

  • Directive to automatically wrap code in code fence with the optional language, e.g. add //md code:csharp, or just //md code: to add fences, and //md code:-- to stop adding fences. The directive may be used multiple times through the file.
  • Converting the section outlined with //md{ and //md} comments into the collapsed markdown details.
  • The optional cstomd.config file in the folder with the lines starters to be removed completely from the generated documentation file.

How to use

  • Install the extension directly from the marketplace in Visual Studio or download the extension vsix file from the release page.
  • In properties of your .cs file, set the CustomTool property to CsToMd.
  • Save the .cs file
  • Check the generated .md file under the .cs file in Solution Explorer
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft