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?

davidp04
  • 33
  • 1
  • 10

2 Answers2

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

ASpirin
  • 3,601
  • 1
  • 23
  • 32
  • 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 – davidp04 Jul 31 '17 at 20:01
  • 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 – ASpirin Jul 31 '17 at 20:05
  • yes, it is in App_data, the App_Code was a typo in the question that I will correct – davidp04 Jul 31 '17 at 20:09
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.