Using http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages documentation guide and applied these on each public API controllers

/// <summary>
///  My own description comments
/// </summary>

but somehow NONE of my Summaries comments do get picked up by the XML generator ApiExplorer.

Any thoughts??

有帮助吗?

解决方案

In the Solution Explorer, right click on the project and go to "Properties". In the "Build" tab check the "XML documentation file" checkbox.

Then copy the generated XML file from the bin folder into the project, commonly "App_Data" folder. Reference the file in the HelpPageConfig.cs of the Help Page MVC area. There will be a commented out line that looks something like config.SetDocumentationProvider(new XmlDocumentationProvider( HttpContext.Current.Server.MapPath("~/App_Data/Doc.xml"))); Change the XML file name and uncomment the line.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top