asp.net webapi publish - xml files not copy

Alexander Subbotin picture Alexander Subbotin · May 15, 2014 · Viewed 37.1k times · Source

I have MVC 4.0 WebApi project with auto generated help based on this.

My model classes are stored it another projects in my solution. Generation of xml file is enabled for every project (Project Properties -> Build -> OutPut -> XML Documentation file - Enabled).

In local debug all is ok - xml files are copied to project directory and i see comments for fields / classes from another projects.

But when i use publish profile (to Folder), xml files don't copy to output folder. Only one xml file from main WebApi project is copied. So i don't see comments to classes from other projects.

Answer

grimus picture grimus · Jan 13, 2016

I had a similar issue, for the me the answer was a bit of a "doh!" moment.

In the project settings, I had only enabled the XML documentation file under the Debug configuration, and not under Release. I was deploying with Release, and so the XML documentation was not actually getting generated. So the fix was making sure to enable the XML documentation for both Debug and Release configurations.