Skip to content

Commit 1da3e1c

Browse files
authored
Update Newtonsoft.Json version and other nuget versions (use CPM) (#1510)
* update nuget versions using CPM
1 parent 6342cff commit 1da3e1c

File tree

51 files changed

+1480
-1341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1480
-1341
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,6 @@ __pycache__/
303303
.AssemblyAttributes
304304
DeterministicTest.props
305305
test/coverlet.integration.determisticbuild/*.txt
306-
test/coverlet.integration.determisticbuild/runsettings
306+
test/coverlet.integration.determisticbuild/runsettings
307+
308+
coverage.cobertura.xml

Directory.Build.props

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1515
<LangVersion>preview</LangVersion>
1616
<NoWarn>$(NoWarn);NU5105;CS1591</NoWarn>
17+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1718
<RestoreSources>
1819
https://api.nuget.org/v3/index.json;
1920
</RestoreSources>
@@ -24,8 +25,4 @@
2425
<Deterministic>true</Deterministic>
2526
</PropertyGroup>
2627

27-
<ItemGroup>
28-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
30-
</ItemGroup>
3128
</Project>

Directory.Build.targets

-28
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,4 @@
11
<Project>
2-
<ItemGroup>
3-
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="15.5.180"/>
4-
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
5-
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
6-
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
7-
<PackageReference Update="Microsoft.Extensions.FileSystemGlobbing" Version="2.0.1" />
8-
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.5.0" />
9-
<!-- https://github.com/coverlet-coverage/coverlet/issues/1042 -->
10-
<PackageReference Update="Microsoft.TestPlatform.ObjectModel" Version="16.9.1" />
11-
<PackageReference Update="Mono.Cecil" Version="0.11.5" />
12-
<PackageReference Update="Moq" Version="4.10.1" />
13-
<!-- Do not upgrade this version or we won't support old SDK -->
14-
<PackageReference Update="Newtonsoft.Json" Version="9.0.1" />
15-
<PackageReference Update="NuGet.Packaging" Version="5.4.0" />
16-
<PackageReference Update="ReportGenerator.Core" Version="4.6.0" />
17-
<!--
18-
Do not change System.Reflection.Metadata version since we need to support VSTest DataCollectors. Goto https://www.nuget.org/packages/System.Reflection.Metadata to check versions.
19-
We need to load assembly version 1.4.2.0 to properly work
20-
We can check minimum supported package version here https://github.com/Microsoft/vstest/blob/master/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L37
21-
-->
22-
<PackageReference Update="System.Reflection.Metadata" Version="1.5.0" />
23-
<PackageReference Update="xunit" Version="2.4.2" />
24-
<PackageReference Update="xunit.assert" Version="2.4.2" />
25-
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1"/>
26-
<PackageReference Update="Tmds.ExecFunction" Version="0.4.0" />
27-
<PackageReference Update="System.CommandLine" Version="2.0.0-beta4.22272.1" />
28-
</ItemGroup>
29-
302
<!-- Deterministic build workaround -->
313
<Import Project="$(RepoRoot)\DeterministicBuild.targets" />
324
</Project>

Directory.Packages.props

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
9+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.5.0"/>
14+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
15+
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
16+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
17+
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="7.0.0" />
18+
<!--For test TestInstrument_NetstandardAwareAssemblyResolver_PreserveCompilationContext-->
19+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
20+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
21+
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.5.0" />
22+
<!-- Microsoft.TestPlatform.ObjectModel has a dependency to NuGet.Frameworks with specific version -->
23+
<!-- https://github.com/microsoft/vstest/blob/9a0c41811637edf4afe0e265e08fdd1cb18109ed/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L35-->
24+
<!-- wrong configuration will create "build\coverlet.msbuild.targets(72,5): error : Unable to read beyond the end of the stream." -->
25+
<!--
26+
vstest 17.5 version /scripts/build/TestPlatform.Dependencies.props
27+
https://github.com/microsoft/vstest/blob/81f87947b316a4faf2bcb5b8c8fa1591baafcc39/scripts/build/TestPlatform.Dependencies.props#L57
28+
vstest 17.8 version
29+
NuGetFrameworksVersion is defined here https://github.com/microsoft/vstest/blob/9a0c41811637edf4afe0e265e08fdd1cb18109ed/eng/Versions.props#L94C1-L94C1
30+
-->
31+
<PackageVersion Include="NuGet.Frameworks" Version="5.11.5" />
32+
<PackageVersion Include="Mono.Cecil" Version="0.11.5" />
33+
<PackageVersion Include="Moq" Version="4.18.4" />
34+
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
35+
<PackageVersion Include="NuGet.Packaging" Version="6.6.1" />
36+
<PackageVersion Include="ReportGenerator.Core" Version="5.1.23" />
37+
<!--For test issue 809 https://github.com/coverlet-coverage/coverlet/issues/809-->
38+
<PackageVersion Include="LinqKit.Microsoft.EntityFrameworkCore" Version="7.1.4" />
39+
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
40+
<!--To test issue 1104 https://github.com/coverlet-coverage/coverlet/issues/1104-->
41+
<PackageVersion Include="System.Collections.Immutable" Version="7.0.0" />
42+
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
43+
<!--
44+
Do not change System.Reflection.Metadata version since we need to support VSTest DataCollectors. Goto https://www.nuget.org/packages/System.Reflection.Metadata to check versions.
45+
We need to load assembly version 1.6.0 to properly work
46+
We can check minimum supported package version here https://github.com/Microsoft/vstest/blob/master/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L34
47+
-->
48+
<PackageVersion Include="System.Reflection.Metadata" Version="1.6.0" />
49+
<!-- Coverlet.Core.Tests executed in Visual Studio will fail with Tmds.ExecFunction version > 0.4.0 => use "dotnet test"
50+
System.TypeInitializationException : The type initializer for 'Tmds.Utils.ExecFunction' threw an exception.
51+
System.NotSupportedException : Application is running as testhost, unable to determine parent 'dotnet' process.
52+
-->
53+
<PackageVersion Include="Tmds.ExecFunction" Version="0.6.0" />
54+
<PackageVersion Include="xunit" Version="2.5.0" />
55+
<PackageVersion Include="xunit.assert" Version="2.5.0" />
56+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0"/>
57+
58+
59+
</ItemGroup>
60+
</Project>

Documentation/ConsumeNightlyBuild.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,54 @@ To consume nightly builds, create a `NuGet.Config` in your root solution directo
88
<packageSources>
99
<clear />
1010
<!-- Coverlet nightly build feed -->
11-
<add key="coverletNightly" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
11+
<add key="coverletNightly" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
1212
<!-- Default nuget feed -->
13-
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
13+
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
1414
<!-- Add all other needed feed -->
1515
</packageSources>
1616
</configuration>
1717
```
1818

1919
## Install packages
2020

21-
### Visual Studio:
21+
### Visual Studio
2222

2323
![File](images/nightly.PNG)\
2424
Example:\
2525
![File](images/nightlyExample.PNG)
2626

27-
### NuGet (Package Manager console):
27+
### NuGet (Package Manager console)
28+
2829
```powershell
2930
PM> Install-Package coverlet.msbuild -Version X.X.X-preview.X.XXX -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
3031
```
32+
3133
Example:
34+
3235
```powershell
3336
PM> Install-Package coverlet.msbuild -Version 3.0.4-preview.4.g5de0ad7d60 -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
3437
```
3538

36-
### .NET CLI:
39+
### .NET CLI
40+
3741
```bash
3842
dotnet add package coverlet.msbuild --version X.X.X-preview.X.XXX --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
3943
```
44+
4045
Example:
46+
4147
```bash
4248
dotnet add package coverlet.msbuild --version 3.0.4-preview.4.g5de0ad7d60 --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
4349
```
4450

45-
### MSBuild project file:
51+
### MSBuild project file
4652

4753
```xml
4854
<PackageReference Include="coverlet.msbuild" Version="X.X.X-preview.X.XXX " />
4955
```
56+
5057
Example:
58+
5159
```xml
5260
<PackageReference Include="coverlet.msbuild" Version="3.0.4-preview.4.g5de0ad7d60" />
53-
```
61+
```

Documentation/DeterministicBuild.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ Support for deterministic builds is available **only** in the `msbuild` (`/p:Col
44

55
From a coverage perspective, deterministic builds create some challenges because coverage tools usually need access to complete source file metadata (ie. local path) during instrumentation and report generation. These files are reported inside the `.pdb` files, where debugging information is stored.
66

7-
In local (non-CI) builds, metadata emitted to pdbs are not "deterministic", which means that source files are reported with their full paths. For example, when we build the same project on different machines we'll have different paths emitted inside pdbs, hence, builds are "non deterministic".
7+
In local (non-CI) builds, metadata emitted to pdbs are not "deterministic", which means that source files are reported with their full paths. For example, when we build the same project on different machines we'll have different paths emitted inside pdbs, hence, builds are "non deterministic".
88

99
As explained above, to improve the level of security of generated artifacts (for instance, DLLs inside the NuGet package), we need to apply some signature (signing with certificate) and validate before usage to avoid possible security issues like tampering.
1010

1111
Finally, thanks to deterministic CI builds (with the `ContinuousIntegrationBuild` property set to `true`) plus signature we can validate artifacts and be sure that the binary was built from specific sources (because there is no hard-coded variable metadata, like paths from different build machines).
1212

13-
# Deterministic report
13+
## Deterministic report
1414

15-
Coverlet supports also deterministic reports(for now only for cobertura coverage format).
15+
Coverlet supports also deterministic reports(for now only for cobertura coverage format).
1616
If you include `DeterministicReport` parameters for `msbuild` and `collectors` integrations resulting report will be like:
17+
1718
```xml
1819
<?xml version="1.0" encoding="utf-8"?>
1920
<coverage line-rate="0.8571" branch-rate="0.5" version="1.9" timestamp="1612702997" lines-covered="6" lines-valid="7" branches-covered="1" branches-valid="2">
@@ -25,8 +26,8 @@ If you include `DeterministicReport` parameters for `msbuild` and `collectors` i
2526
<methods>
2627
...
2728
```
28-
As you can see we have empty `<sources />` element and the `filename` start with well known deterministic fragment `/_/...`
2929

30+
As you can see we have empty `<sources />` element and the `filename` start with well known deterministic fragment `/_/...`
3031
**Deterministic build is supported without any workaround since version 3.1.100 of .NET Core SDK**
3132

3233
## Workaround only for .NET Core SDK < 3.1.100

Documentation/Examples.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Examples
2+
23
## MSBuild Integration
34

45
* Using `/p:MergeWith` feature `Documentation/Examples/MSBuild/MergeWith/MergeWith.sln`

Documentation/Examples/MSBuild/DeterministicBuild/HowTo.md

+28-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
To run test we need to generates packages to reference in on test project.
1+
To run test we need to generates packages to reference in on test project.
22
Run from repo root
3-
```
3+
4+
```shell
45
C:\git\coverlet
56
λ dotnet pack
67
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core
@@ -23,31 +24,31 @@ Copyright (C) Microsoft Corporation. All rights reserved.
2324
coverlet.core -> C:\git\coverlet\src\coverlet.core\bin\Debug\netstandard2.0\coverlet.core.dll
2425
coverlet.collector -> C:\git\coverlet\src\coverlet.collector\bin\Debug\netcoreapp2.0\coverlet.collector.dll
2526
coverlet.msbuild.tasks -> C:\git\coverlet\src\coverlet.msbuild.tasks\bin\Debug\netstandard2.0\coverlet.msbuild.tasks.dll
26-
coverlet.console -> C:\git\coverlet\src\coverlet.console\bin\Debug\netcoreapp2.2\coverlet.console.dll
27-
coverlet.console -> C:\git\coverlet\src\coverlet.console\bin\Debug\netcoreapp2.2\coverlet.console.dll
28-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.1.3.0-preview.6.ga0e22ec622.nupkg'.
29-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.console.1.7.2-preview.6.ga0e22ec622.nupkg'.
30-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.console.1.7.2-preview.6.ga0e22ec622.snupkg'.
31-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.1.3.0-preview.6.ga0e22ec622.snupkg'.
32-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.msbuild.2.9.0-preview.6.ga0e22ec622.nupkg'.
33-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.msbuild.2.9.0-preview.6.ga0e22ec622.snupkg'.
27+
coverlet.console -> C:\git\coverlet\src\coverlet.console\bin\Debug\net6.0\coverlet.console.dll
28+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.6.0.1-preview.6.g918cd179e0.nupkg'.
29+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.6.0.1-preview.6.g918cd179e0.snupkg'.
30+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.msbuild.6.0.1-preview.6.g918cd179e0.nupkg'.
31+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.msbuild.6.0.1-preview.6.g918cd179e0.snupkg'.
32+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.console.6.0.1-preview.6.g918cd179e0.nupkg'.
33+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.console.6.0.1-preview.6.g918cd179e0.snupkg'.
3434
```
35+
3536
Add msbuild package version generated to `"..\Documentation\Examples\MSBuild\DeterministicBuild\XUnitTestProject1\XUnitTestProject1.csproj"`
37+
3638
```xml
3739
<Project Sdk="Microsoft.NET.Sdk">
3840

3941
<PropertyGroup>
40-
<TargetFramework>netcoreapp3.1</TargetFramework>
42+
<TargetFramework>net6.0</TargetFramework>
4143
<IsPackable>false</IsPackable>
4244
</PropertyGroup>
4345

4446
<ItemGroup>
45-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
46-
<PackageReference Include="xunit" Version="2.4.0" />
47-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
48-
<PackageReference Include="coverlet.collector" Version="1.2.0" />
49-
<!-- version comes from coverlet.msbuild.2.9.0-preview.6.ga0e22ec622.nupkg -->
50-
<PackageReference Include="coverlet.msbuild" Version="2.9.0-preview.6.ga0e22ec622" >
47+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
48+
<PackageReference Include="xunit" Version="2.5.0" />
49+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
50+
<!-- version comes from coverlet.msbuild.6.0.1-preview.8.gcb9b802a5f.nupkg -->
51+
<PackageReference Include="coverlet.msbuild" Version="coverlet.msbuild.6.0.1-preview.8.gcb9b802a5f.nupkg" >
5152
<PrivateAssets>all</PrivateAssets>
5253
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5354
</PackageReference>
@@ -58,14 +59,15 @@ Add msbuild package version generated to `"..\Documentation\Examples\MSBuild\Det
5859
</ItemGroup>
5960

6061
</Project>
61-
6262
```
63+
6364
Go to test project folder and run
64-
```
65+
66+
```shell
6567
C:\git\coverlet\Documentation\Examples\MSBuild\DeterministicBuild (detbuilddocs -> origin)
6668
λ dotnet test /p:CollectCoverage=true /p:DeterministicSourcePaths=true
67-
Test run for C:\git\coverlet\Documentation\Examples\MSBuild\DeterministicBuild\XUnitTestProject1\bin\Debug\netcoreapp3.1\XUnitTestProject1.dll(.NETCoreApp,Version=v3.1)
68-
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
69+
Test run for C:\git\coverlet\Documentation\Examples\MSBuild\DeterministicBuild\XUnitTestProject1\bin\Debug\net6.0\XUnitTestProject1.dll(.NETCoreApp,Version=v6.0)
70+
Microsoft (R) Test Execution Command Line Tool Version 17.5.0
6971
Copyright (c) Microsoft Corporation. All rights reserved.
7072

7173
Starting test execution, please wait...
@@ -94,8 +96,10 @@ Calculating coverage result...
9496
| Average | 100% | 100% | 100% |
9597
+---------+------+--------+--------+
9698
```
97-
You should see on output folder the coverlet source root mapping file generated.
99+
100+
You should see on output folder the coverlet source root mapping file generated.
98101
This is the confirmation that you're running coverage on deterministic build.
102+
103+
```text
104+
Documentation\Examples\MSBuild\DeterministicBuild\XUnitTestProject1\bin\Debug\net6.0\CoverletSourceRootsMapping
99105
```
100-
Documentation\Examples\MSBuild\DeterministicBuild\XUnitTestProject1\bin\Debug\netcoreapp3.1\CoverletSourceRootsMapping
101-
```

Documentation/Examples/MSBuild/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
10-
<PackageReference Include="xunit" Version="2.4.0" />
11-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
12-
<PackageReference Include="coverlet.collector" Version="1.2.0" />
9+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
10+
<PackageReference Include="xunit" Version="2.5.0" />
11+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
1312
<PackageReference Include="coverlet.msbuild" Version="ADD VERSION FROM bin\Debug\Packages generated running 'dotnet pack' from repo root" >
1413
<PrivateAssets>all</PrivateAssets>
1514
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
**Run from solution root sln**
22

3-
To merge report togheter you need to run separate test and merge in one `json` format file.
3+
To merge report together you need to run separate test and merge in one `json` format file.
44
Last command will join and create final needed format file.
55

6-
```
6+
```shell
77
dotnet test XUnitTestProject1\XUnitTestProject1.csproj /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/
88
dotnet test XUnitTestProject2\XUnitTestProject2.csproj /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json"
99
dotnet test XUnitTestProject3\XUnitTestProject3.csproj /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat="opencover"
1010
```
1111

1212
You can merge also running `dotnet test` and merge with single command from a solution file, but you need to ensure that tests will run sequentially(`-m:1`). This slow down testing but avoid invalid coverage result.
1313

14-
```
14+
```shell
1515
dotnet test /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat=\"opencover,json\" -m:1
1616
```
17+
1718
N.B. You need to specify `json` format plus another format(the final one), because Coverlet can only merge proprietary format. At the end you can delete temporary `coverage.json` file.
1819

1920
You can also merge the coverage result and generate another valid format to export the content than opencover, like cobertura.
2021

21-
```
22+
```shell
2223
dotnet test /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat=\"cobertura,json\" -m:1
2324
```

0 commit comments

Comments
 (0)