Web API Help page not showing XML
Asked Answered
S

1

7

I have a Web API project in which I removed by hand Areas folder few months ago when we started development. Now after everything is finished I want to add API help pages but it is not working as expected.

I installed nuget package for help pages.

I uncommented line in HelpPageConfig.cs

I checked Generate documentation file (to App_Data folder)

When I open http://localhost:51665/help I get this: (No methods are shown)

enter image description here

Any idea what could be wrong? If I start new project from scratch everything works properly.

Sturdy answered 7/5, 2015 at 12:46 Comment(0)
A
3

I suppose you've setup your project in two steps:

  1. You should choose Build tab in API project Properties and set up XML Documentation file in Output section. For example: App_Data\XmlDocument.xml
  2. Then you can updateHelpPageConfig.cs in method Register... in my case

config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));

  • When your project is in compilation process, take a look in output window, whether documentation is really generated.
  • Try to use older version of ASP.NET Help pages (version 5.2.2 works for me).

    Install-Package Microsoft.AspNet.WebApi.HelpPage -Version 5.2.2

Addiel answered 7/5, 2015 at 18:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.