سؤال

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