5

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.

2 Answers 2

6

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

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

Comments

2

HelpPage only requires a valid path to a file to read from, so it doesn't matter if the file is coming from App_Data folder or the bin folder.

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.