0

I created an Asp.net api in VS2015. Inside the Areas>HelpPage>App_Start>HelpPageConfig.cs I uncommented line 37

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

There was no XmlDocument.xml in the App_Data folder for the project so I created one with the tags I'd seen in self documenting xml's in other apis

<?xml version="1.0" encoding="utf-8" ?>
<doc>
  <assembly>
    <name>NameOfApiHere</name>
  </assembly>
  <members>
  </members>
</doc>

but when building and/or running the application nothing is going into the xml. It's my understanding that when this is turned on the XML sel documents based on each ///summary for a given method with an intellisense alert for any public method that does not have a summary but I cna't find any code that would explicitly copy summary information to this xml as "member" tags inside of teh "members" tag nor is it happening. What step am I missing that I'm not seeing in the how to's on the internet for turning on self documentation in an APi?

2 Answers 2

1

In project propeties repoint XML documentation destintion folder to your desired folder. I suppose it would be better to use app_data instead of App_code folder.

take a look into 1st and 2nd steps of this question answer

Sign up to request clarification or add additional context in comments.

3 Comments

This led me to it, it was in the properties unter build, I had to both check "XML Documentation file:" and set the path to my xml
did you tried change folder to app_data? In any case XmlDocumentationProvider is in your project Debug it and you'll see why it's not working
yes, it is in App_data, the App_Code was a typo in the question that I will correct
0

Try deleting the XmlDocument.xml file that you added (I think this autogenerates) and specify the path to it in the project settings -> Build tab inside the Output section.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.