XML documentation not found when publishing a .Net Framework web API?

落爺英雄遲暮 提交于 2021-01-28 21:27:07

问题


I scratched my head over this one for a few hours. I followed Microsoft's tutorial on adding API documentation. That all worked as expected on my local machine, but when published to my production IIS server, I got an error saying the XmlDocument.xml could not be found.


回答1:


Although enabling the "XML documentation file" checkbox in the project properties > build > output section does create the file, it does not add it to the project for some reason. That's why the App_Data folder in my solution explorer was empty.

The solution is simple. Right-click on the App_Data folder and select the add existing item option. Select the generated XML documentation file in the "App_Data" folder of your project's build location. Publish again.

I hope someone can find this useful.



来源:https://stackoverflow.com/questions/62155966/xml-documentation-not-found-when-publishing-a-net-framework-web-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!