netcore swagger xml发布丢失问题

1、netcore2.1.2,swagger.aspnetcore 1.1.0版本。发布netcore项目时swagger的接口文档xml 遗漏,始终发布不上去。后来查阅资料,讲的好像是netcore的一个bug,默认过滤掉一些xml文件。如果需要发布,则需要改动csproj文件或project.json文件。

https://stackoverflow.com/questions/42385162/xml-documentation-file-is-not-included-in-publish-folder

2、修改csproj文件

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

原文地址:https://www.cnblogs.com/taoshengyujiu/p/8341861.html