发布的时候如果用 release

dotnet publish --configuration release  

dotnet publish 默认都是debug

会出现 XML丢失问题,其实可以看下工程文件

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <DocumentationFile>bin\Debug\netcoreapp2.0\UserServicesApi.xml</DocumentationFile>
  </PropertyGroup>

注意到是Debug目录

或者看下项目属性的输出

.NetCore利用Swagger生成 XML文档需要注意生成路径的地址

 

修改一下 Release目录

.NetCore利用Swagger生成 XML文档需要注意生成路径的地址

 

.NetCore利用Swagger生成 XML文档需要注意生成路径的地址

 

所以发布 Release的时候要注意这个问题

 

相关文章:

  • 2021-09-15
  • 2022-12-23
  • 2022-01-24
  • 2022-02-05
  • 2021-10-30
  • 2021-11-05
  • 2021-12-14
  • 2022-01-21
猜你喜欢
  • 2022-02-03
  • 2021-10-25
  • 2021-10-01
  • 2022-12-23
  • 2021-08-04
  • 2021-05-08
相关资源
相似解决方案