Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML Help documentation for Web API not being updated on publish

Per online documentation and the commented code in HelpPageConfig.cs, enabling XML documentation adds an XML file to ~App_data/name_of_file.xml. The project build properties are then set to match that path.

However, when publishing, the XML file doesn't seem to publish, which causes a YSOD when accessing the api's help page. I've verified that the file's Build Action is set to Content. I've also tried playing with the Copy to Output Directory with no effect.

Anyway, for the sake of curiosity, I'm wondering if there's a solution that uses their recommended file location or if it's just some kind of obsolete recommendation; otherwise, I suppose I can try moving it to the bin directory.

I'm using the Web API 2.1 Help Page nuget package.

like image 604
user3191350 Avatar asked Feb 14 '23 12:02

user3191350


1 Answers

I had a similar issue when attempting a publish to Azure. I had to include the help doc *.xml files in the project and then they were able to publish.

enter image description here

Also make sure in your publish options the "Exclude files from the App_Data folder" is unchecked if you are sourcing them to the App_Data folder.

enter image description here

like image 87
gmetzker Avatar answered Feb 16 '23 03:02

gmetzker