Every time I Publish a Web Deployment Package using a Release Build I get this error once I call the Web API;
HTTP 500 Internal Server Error
Could not find file 'C:\SolutionDir\ProjectDir\bin\AssemblyName.xml'
Here is the steps I perform when deploying to the server.
Publish...
Publish
.Deploy -> Import Application...
.Finish
.After this process I attempt to test the Web API using Fiddler and receive the error mentioned above. I've tried various methods but nothing has worked so far, the only way I can make it work is by copying the XML files into the bin
folder on the server from a Debug build of the project.
What I don't understand is I shouldn't need to do this to make it work, why does Visual Studio / Web Deployment insist the XML exists?
Solutions I've already tried
If you create a web API project with certain options it also includes MVC functionality to display web API help pages based on the XML documentation.
I think the Nuget package that will be in the solution is called Microsoft.AspNet.WebApi.HelpPage
.
I've never used it, so I'm not up with when it may potentially check for the XML files, but perhaps removing this and the MVC stuff (if you do not use the documentation) will stop it looking for the XML files.