Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I installed the ASP.NET Web API Help Page package and would like to use it to generate documentation for my API controller actions using the Xml comments already on them.

I came across an article on Yao's MSDN blog where he discusses how the documentation can be generated based on the XML comments.

However, in the Register method of HelpPageConfig, the SetDocumentationProvider method expects an instance of XmlDocumentationProvider constructed with a physical path to an Xml documentation file.

Is there another way to do this? I'm not clear why I need to point to an Xml documentation file.

Thanks

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

The XmlDocumentationProvider is looking for the xml file(having your xml code comments) which gets generated when you compile your project. You can enable generating this by going to your project Properties -> Build -> Output. Here select the checkbox for XML Documentation file.

share|improve this answer
1  
Kiran, thank you, this does the trick. Is there a good way to programmatically access this value at runtime? Right now I'm doing HttpContext.Current.Server.MapPath ... –  George Durzi Feb 13 '13 at 0:02
    
thanks a lot for this reply, finally figured out how to get this working. –  Thomas Stock Nov 16 '13 at 16:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.