TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: C# DocGen like Javadoc?

13 pointsby alistproducer2over 7 years ago
There&#x27;s an internal team at my job that&#x27;s trying to get people to use a framework they built. The problem is there&#x27;s no documentation; this despite the code being well commented in what appears to be a structured fashion. An example looks like this:<p>&#x2F;&#x2F;&#x2F; &lt;summary&gt;<p>&#x2F;&#x2F;&#x2F; Waits for the Page&#x27;s DOM to fully.....<p>&#x2F;&#x2F;&#x2F; &lt;&#x2F;summary&gt;<p>&#x2F;&#x2F;&#x2F; &lt;param name=&quot;classInstance&quot;&gt;The PageObject instance to be populated.&lt;&#x2F;param&gt;<p>does anyone recognize this format and, even better, a tool used to turn this into usable HTML documentation?

6 comments

WorldMakerover 7 years ago
Those comments auto-build an XML output; it&#x27;s a built-in feature of the C# compiler. [1]<p>There are a number of XSLT stylesheets and more complicated tools around, many from relatively ancient times in the .NET world, to generate prettier documentation from those comments. NDoc [2] is ancient but still presumably works. I last used SandCastle, whose website proclaims it shutdown and forwards to fork SHFB [3], and some of whose guts inspired DocFX [4].<p>As another comment points out it appears that DocFX is the latest toolset Microsoft themselves are using (it&#x27;s one of a couple of build tools for the new mostly all open source docs.microsoft.com site).<p>[1] <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;csharp&#x2F;programming-guide&#x2F;xmldoc&#x2F;xml-documentation-comments" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;csharp&#x2F;programming-g...</a><p>[2] <a href="http:&#x2F;&#x2F;ndoc.sourceforge.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ndoc.sourceforge.net&#x2F;</a><p>[3] <a href="http:&#x2F;&#x2F;github.com&#x2F;EWSoftware&#x2F;SHFB" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;EWSoftware&#x2F;SHFB</a><p>[4] <a href="https:&#x2F;&#x2F;dotnet.github.io&#x2F;docfx&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dotnet.github.io&#x2F;docfx&#x2F;</a>
评论 #15261579 未加载
eschutte2over 7 years ago
This is a Visual Studio feature. <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;csharp&#x2F;programming-guide&#x2F;xmldoc&#x2F;recommended-tags-for-documentation-comments" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;csharp&#x2F;programming-g...</a>
noaccounthereover 7 years ago
<a href="https:&#x2F;&#x2F;dotnet.github.io&#x2F;docfx&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dotnet.github.io&#x2F;docfx&#x2F;</a><p>I believe this is used to generate some of the official Microsoft documentation.<p>We use it on our team -- it&#x27;s pretty basic, but allows Markdown formatted content and ingests the triple slash comments.<p>The biggest downside is that it is extremely slow.
评论 #15271392 未加载
tjrover 7 years ago
Looks like maybe:<p><a href="http:&#x2F;&#x2F;www.stack.nl&#x2F;~dimitri&#x2F;doxygen&#x2F;manual&#x2F;xmlcmds.html" rel="nofollow">http:&#x2F;&#x2F;www.stack.nl&#x2F;~dimitri&#x2F;doxygen&#x2F;manual&#x2F;xmlcmds.html</a>
tallesover 7 years ago
In Visual Studio, if you&#x27;re distributing it via NuGet package you can send the xml doc along with the code and consume it via Intellisense (as you type it), similar to what happens when you use the .NET framework itself.<p>Right click the project, &quot;Properties&quot;, &quot;Build&quot;, enable &quot;XML documentation file&quot;. When creating the NuGet package make sure the xml is in the same folder as the dll.
scopecreepover 7 years ago
That looks a lot like the format for auto-generated method comments from VS.net ~2013 or so.