-
Notifications
You must be signed in to change notification settings - Fork 392
Update Newtonsoft.Json version and other nuget versions (use CPM) #1510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
daveMueller
merged 26 commits into
coverlet-coverage:master
from
Bertk:update-all-nuget-versions
Aug 19, 2023
Merged
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
33affd6
update documentation
Bertk f6d0adf
update nuget versions using CPM
Bertk e4e5bd0
restart CI
Bertk 16f82a0
update SDK version (Collector.cs)
Bertk 3ff04de
collect test result files
Bertk a40ae62
enable coverage for build report
Bertk 97c72b1
fix yaml
Bertk 0515e43
disable template publish-coverage-results.yml
Bertk 7df9aa0
use Assert.Equal with static string
Bertk 5415d32
fix markdown warnings and add properties PackageReadmeFile, PackageRe…
Bertk e1ab9e8
change limitation formatting
Bertk d729057
update requirements
Bertk a3432e4
update Tmds.ExecFunction version and enable test execution with .NET …
Bertk 4ebed44
add comment
Bertk a73616b
remove rollForward from global.json (conflict with rollForwardOnNoCan…
Bertk 50451a7
incorporate review comments
Bertk c901ebf
incorporate review comments
Bertk 9c4fad5
run test only on windows plattform (net48 library)
Bertk 40fffda
remove coverlet.tests.projectsample.vbmynamespace.vbproj from solutio…
Bertk 007a9a1
run Instrumenter_MethodsWithoutReferenceToSource_AreSkipped only for …
Bertk fafa174
remove PackageReference VersionOverride for test dependencies
Bertk 7d2d4a3
Merge branch 'master' into update-all-nuget-versions
Bertk 646b06d
remove condition for coverlet.tests.projectsample.vbmynamespace.vbproj
Bertk 960ad93
reverted os skip
daveMueller 950347d
nit
daveMueller 187ac2b
fix
daveMueller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,4 @@ | ||
| <Project> | ||
| <ItemGroup> | ||
| <PackageReference Update="Microsoft.Build.Utilities.Core" Version="15.5.180"/> | ||
| <PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" /> | ||
| <PackageReference Update="Microsoft.Extensions.DependencyModel" Version="2.1.0" /> | ||
| <PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="6.0.1" /> | ||
| <PackageReference Update="Microsoft.Extensions.FileSystemGlobbing" Version="2.0.1" /> | ||
| <PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.5.0" /> | ||
| <!-- https://github.com/coverlet-coverage/coverlet/issues/1042 --> | ||
| <PackageReference Update="Microsoft.TestPlatform.ObjectModel" Version="16.9.1" /> | ||
| <PackageReference Update="Mono.Cecil" Version="0.11.5" /> | ||
| <PackageReference Update="Moq" Version="4.10.1" /> | ||
| <!-- Do not upgrade this version or we won't support old SDK --> | ||
| <PackageReference Update="Newtonsoft.Json" Version="9.0.1" /> | ||
| <PackageReference Update="NuGet.Packaging" Version="5.4.0" /> | ||
| <PackageReference Update="ReportGenerator.Core" Version="4.6.0" /> | ||
| <!-- | ||
| 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. | ||
| We need to load assembly version 1.4.2.0 to properly work | ||
| We can check minimum supported package version here https://github.com/Microsoft/vstest/blob/master/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L37 | ||
| --> | ||
| <PackageReference Update="System.Reflection.Metadata" Version="1.5.0" /> | ||
| <PackageReference Update="xunit" Version="2.4.2" /> | ||
| <PackageReference Update="xunit.assert" Version="2.4.2" /> | ||
| <PackageReference Update="xunit.runner.visualstudio" Version="2.4.1"/> | ||
| <PackageReference Update="Tmds.ExecFunction" Version="0.4.0" /> | ||
| <PackageReference Update="System.CommandLine" Version="2.0.0-beta4.22272.1" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- Deterministic build workaround --> | ||
| <Import Project="$(RepoRoot)\DeterministicBuild.targets" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
| <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" /> | ||
| <GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.5.0"/> | ||
| <PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="7.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" /> | ||
| <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> | ||
| <PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.5.0" /> | ||
| <!-- Microsoft.TestPlatform.ObjectModel has a dependency to NuGet.Frameworks with specific version --> | ||
| <!-- https://github.com/microsoft/vstest/blob/9a0c41811637edf4afe0e265e08fdd1cb18109ed/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L35--> | ||
| <!-- wrong configuration will create "build\coverlet.msbuild.targets(72,5): error : Unable to read beyond the end of the stream." --> | ||
| <!-- | ||
| vstest 17.5 version /scripts/build/TestPlatform.Dependencies.props | ||
| https://github.com/microsoft/vstest/blob/81f87947b316a4faf2bcb5b8c8fa1591baafcc39/scripts/build/TestPlatform.Dependencies.props#L57 | ||
| vstest 17.8 version | ||
| NuGetFrameworksVersion is defined here https://github.com/microsoft/vstest/blob/9a0c41811637edf4afe0e265e08fdd1cb18109ed/eng/Versions.props#L94C1-L94C1 | ||
| --> | ||
| <PackageVersion Include="NuGet.Frameworks" Version="5.11.5" /> | ||
| <PackageVersion Include="Mono.Cecil" Version="0.11.5" /> | ||
| <PackageVersion Include="Moq" Version="4.18.4" /> | ||
| <PackageVersion Include="Newtonsoft.Json" Version="13.0.1" /> | ||
| <PackageVersion Include="NuGet.Packaging" Version="6.6.1" /> | ||
| <PackageVersion Include="ReportGenerator.Core" Version="5.1.23" /> | ||
| <PackageVersion Include="LinqKit.Microsoft.EntityFrameworkCore" Version="7.1.4" /> | ||
Bertk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" /> | ||
| <PackageVersion Include="System.Collections.Immutable" Version="7.0.0" /> | ||
| <PackageVersion Include="System.Linq.Async" Version="6.0.1" /> | ||
| <!-- | ||
| 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. | ||
| We need to load assembly version 1.6.0 to properly work | ||
| We can check minimum supported package version here https://github.com/Microsoft/vstest/blob/master/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L34 | ||
| --> | ||
| <PackageVersion Include="System.Reflection.Metadata" Version="1.6.0" /> | ||
| <!-- Coverlet.Core.Tests executed in Visual Studio will fail with Tmds.ExecFunction version > 0.4.0 => use "dotnet test" | ||
| System.TypeInitializationException : The type initializer for 'Tmds.Utils.ExecFunction' threw an exception. | ||
| System.NotSupportedException : Application is running as testhost, unable to determine parent 'dotnet' process. | ||
| --> | ||
| <PackageVersion Include="Tmds.ExecFunction" Version="0.6.0" /> | ||
| <PackageVersion Include="xunit" Version="2.5.0" /> | ||
| <PackageVersion Include="xunit.assert" Version="2.5.0" /> | ||
| <PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0"/> | ||
|
|
||
|
|
||
| </ItemGroup> | ||
| </Project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
Documentation/Examples/MSBuild/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| **Run from solution root sln** | ||
|
|
||
| To merge report togheter you need to run separate test and merge in one `json` format file. | ||
| To merge report together you need to run separate test and merge in one `json` format file. | ||
| Last command will join and create final needed format file. | ||
|
|
||
| ``` | ||
| ```shell | ||
| dotnet test XUnitTestProject1\XUnitTestProject1.csproj /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ | ||
| dotnet test XUnitTestProject2\XUnitTestProject2.csproj /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" | ||
| dotnet test XUnitTestProject3\XUnitTestProject3.csproj /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat="opencover" | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| ``` | ||
| ```shell | ||
| dotnet test /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat=\"opencover,json\" -m:1 | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| You can also merge the coverage result and generate another valid format to export the content than opencover, like cobertura. | ||
|
|
||
| ``` | ||
| ```shell | ||
| dotnet test /p:CollectCoverage=true /p:CoverletOutput=../CoverageResults/ /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat=\"cobertura,json\" -m:1 | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.