diff --git a/.azure/pipelines/ci-official.yml b/.azure/pipelines/ci-official.yml
index 788dba04..3ca61ac1 100644
--- a/.azure/pipelines/ci-official.yml
+++ b/.azure/pipelines/ci-official.yml
@@ -65,7 +65,23 @@ jobs:
inputs:
command: test
projects: '**/*Tests/*.csproj'
- arguments: '--configuration $(BuildConfiguration)'
+ arguments: '--configuration $(BuildConfiguration) --collect:"XPlat Code Coverage"'
+
+ - task: DotNetCoreCLI@2
+ inputs:
+ command: custom
+ custom: tool
+ arguments: install --tool-path . dotnet-reportgenerator-globaltool
+ displayName: Install ReportGenerator tool
+
+ - script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"HtmlInline_AzurePipelines;Cobertura;Badges"
+ displayName: Create reports
+
+ - task: PublishCodeCoverageResults@1
+ displayName: 'Publish code coverage'
+ inputs:
+ codeCoverageTool: Cobertura
+ summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml
- script: dotnet pack --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)
displayName: Pack
diff --git a/tests/BaGet.Core.Tests/BaGet.Core.Tests.csproj b/tests/BaGet.Core.Tests/BaGet.Core.Tests.csproj
index afe3c5b9..50ca5e84 100644
--- a/tests/BaGet.Core.Tests/BaGet.Core.Tests.csproj
+++ b/tests/BaGet.Core.Tests/BaGet.Core.Tests.csproj
@@ -4,16 +4,6 @@
netcoreapp3.1
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
-
diff --git a/tests/BaGet.Protocol.Tests/BaGet.Protocol.Tests.csproj b/tests/BaGet.Protocol.Tests/BaGet.Protocol.Tests.csproj
index 28ef0c18..83f963a3 100644
--- a/tests/BaGet.Protocol.Tests/BaGet.Protocol.Tests.csproj
+++ b/tests/BaGet.Protocol.Tests/BaGet.Protocol.Tests.csproj
@@ -4,16 +4,6 @@
netcoreapp3.1
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
-
diff --git a/tests/BaGet.Tests/BaGet.Tests.csproj b/tests/BaGet.Tests/BaGet.Tests.csproj
index e1fc2f5f..734bd403 100644
--- a/tests/BaGet.Tests/BaGet.Tests.csproj
+++ b/tests/BaGet.Tests/BaGet.Tests.csproj
@@ -12,12 +12,6 @@
-
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
index bece70dc..5c6c5f25 100644
--- a/tests/Directory.Build.props
+++ b/tests/Directory.Build.props
@@ -12,11 +12,23 @@
- 3.0.2
- 4.10.0
+ 3.1.1
12.0.2
5.4.0
2.4.1
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+