Howto exclude xml documentation files from referenced packages in published output

Viewed 300

I have a reference to System.Reactive in my project <PackageReference Include="System.Reactive" Version="4.4.1" />

When I publish this I get a 3MB xml documentation file that I don't need in my published output. Anybody has any idea how to exclude these files from the published output?

And I don't mean setting <GenerateDocumentationFile>false</GenerateDocumentationFile>, because I need the documentation files of my own projects to be published for Swagger documentation.

Update

I publish using the dotnet publish command:

dotnet publish -c Release .\src\***.csproj -o $(Build.ArtifactStagingDirectory) -r linux-x64

0 Answers
Related