發布的時候如果用 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目錄
或者看下項目屬性的輸出
修改一下 Release目錄
所以發布 Release的時候要注意這個問題