Skip to content
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

Use System.Text.Json 8.0.5 #1675

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<LangVersion>preview</LangVersion>
<NoWarn>$(NoWarn);NU1507;NU5105;CS1591</NoWarn>
<NoWarn>$(NoWarn);NU1507;NU5105;CS1591;IDE0008;IDE2000</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RestoreSources>
https://api.nuget.org/v3/index.json;
Expand Down
32 changes: 16 additions & 16 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.143" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="DotNetConfig" Version="1.2.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.8.3" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.8.3" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.6.10" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<!--For test TestInstrument_NetstandardAwareAssemblyResolver_PreserveCompilationContext-->
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.8.0" />
<!-- Microsoft.TestPlatform.ObjectModel has a dependency to NuGet.Frameworks with specific version -->
Expand All @@ -30,30 +31,29 @@
NuGetFrameworksVersion is defined here https://github.com/microsoft/vstest/blob/9a0c41811637edf4afe0e265e08fdd1cb18109ed/eng/Versions.props#L94C1-L94C1
-->
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NuGet.Frameworks" Version="6.8.0" />
<PackageVersion Include="NuGet.Packaging" Version="6.8.0" />
<PackageVersion Include="NuGet.Versioning" Version="6.8.0" />
<PackageVersion Include="NuGet.Frameworks" Version="6.11.0" />
<PackageVersion Include="NuGet.Packaging" Version="6.11.0" />
<PackageVersion Include="NuGet.Versioning" Version="6.11.0" />
<PackageVersion Include="Mono.Cecil" Version="0.11.6" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="ReportGenerator.Core" Version="5.2.1" />
<!--For test issue 809 https://github.com/coverlet-coverage/coverlet/issues/809-->
<PackageVersion Include="LinqKit.Microsoft.EntityFrameworkCore" Version="7.1.4" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<!--To test issue 1104 https://github.com/coverlet-coverage/coverlet/issues/1104-->
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageVersion Include="System.IO.Pipelines" Version="8.0.0" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.0" />
<PackageVersion Include="Tmds.ExecFunction" Version="0.7.1" />
<PackageVersion Include="xunit" Version="2.6.6" />
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.1" />
<PackageVersion Include="Tmds.ExecFunction" Version="0.8.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.assemblyfixture" Version="2.2.0" />
<PackageVersion Include="xunit.assert" Version="2.6.6" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6" />
<PackageVersion Include="System.Buffers" Version="4.5.1" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="xunit.assert" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="6.0.4" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
</ItemGroup>
</Project>
11 changes: 3 additions & 8 deletions eng/azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ pool:
steps:
- task: UseDotNet@2
inputs:
version: 6.0.416
displayName: Install .NET Core SDK 6.0.416

- task: UseDotNet@2
inputs:
version: 8.0.101
displayName: Install .NET Core SDK 8.0.101
version: 6.0.425
displayName: Install .NET Core SDK 6.0.425

- task: UseDotNet@2
inputs:
useGlobalJson: true
displayName: Install .NET Core SDK 8.0.100
displayName: Install .NET Core SDK 8.0.108

- task: NuGetAuthenticate@1
displayName: Authenticate with NuGet feeds
Expand Down
11 changes: 3 additions & 8 deletions eng/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
steps:
- task: UseDotNet@2
inputs:
version: 6.0.418
displayName: Install .NET Core SDK 6.0.418

- task: UseDotNet@2
inputs:
version: 7.0.405
displayName: Install .NET Core SDK 7.0.405
version: 6.0.425
displayName: Install .NET Core SDK 6.0.425

- task: UseDotNet@2
inputs:
useGlobalJson: true
displayName: Install .NET Core SDK 8.0.101
displayName: Install .NET Core SDK 8.0.108

# create artifact/package folder
- pwsh: |
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.101"
"version": "8.0.108"
}
}
1 change: 0 additions & 1 deletion src/coverlet.collector/coverlet.collector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<Authors>tonerdo</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/coverlet-coverage/coverlet</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/tonerdo/coverlet/master/_assets/coverlet-icon.svg?sanitize=true</PackageIconUrl>
<PackageIcon>coverlet-icon.png</PackageIcon>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Description>Coverlet is a cross platform code coverage library for .NET, with support for line, branch and method coverage.</Description>
Expand Down
1 change: 0 additions & 1 deletion src/coverlet.console/coverlet.console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<PackageTags>coverage;testing;unit-test;lcov;opencover;quality</PackageTags>
<PackageReadmeFile>GlobalTool.md</PackageReadmeFile>
<PackageReleaseNotes>https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Changelog.md</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/tonerdo/coverlet/master/_assets/coverlet-icon.svg?sanitize=true</PackageIconUrl>
<PackageIcon>coverlet-icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/coverlet-coverage/coverlet</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
8 changes: 5 additions & 3 deletions src/coverlet.core/coverlet.core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="6.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyModel" VersionOverride="6.0.0"/>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" VersionOverride="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" VersionOverride="6.0.1"/>
Expand All @@ -17,13 +16,16 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="6.0.0" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="6.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="6.0.0"/>
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutableVersion)"/>
<PackageReference Include="System.Text.Json" VersionOverride="6.0.10" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<Authors>tonerdo</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/coverlet-coverage/coverlet</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/tonerdo/coverlet/master/_assets/coverlet-icon.svg?sanitize=true</PackageIconUrl>
<PackageIcon>coverlet-icon.png</PackageIcon>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<DevelopmentDependency>true</DevelopmentDependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(RepoRoot)src\coverlet.msbuild.tasks\coverlet.msbuild.props" />

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
7 changes: 3 additions & 4 deletions test/coverlet.core.tests/Reporters/OpenCoverReporterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Coverlet.Core.Abstractions;
Expand All @@ -28,9 +27,9 @@ public void TestReport()
string report = reporter.Report(result, new Mock<ISourceRootTranslator>().Object);
Assert.NotEmpty(report);
var doc = XDocument.Load(new StringReader(report));
Assert.Empty(doc.Descendants().Attributes("sequenceCoverage").Where(v => v.Value != "33.33"));
Assert.Empty(doc.Descendants().Attributes("branchCoverage").Where(v => v.Value != "25"));
Assert.Empty(doc.Descendants().Attributes("nPathComplexity").Where(v => v.Value != "4"));
Assert.DoesNotContain(doc.Descendants().Attributes("sequenceCoverage"), v => v.Value != "33.33");
Assert.DoesNotContain(doc.Descendants().Attributes("branchCoverage"), v => v.Value != "25");
Assert.DoesNotContain(doc.Descendants().Attributes("nPathComplexity"), v => v.Value != "4");
}

[Fact]
Expand Down
6 changes: 2 additions & 4 deletions test/coverlet.core.tests/coverlet.core.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<ItemGroup>
<PackageReference Include="LinqKit.Microsoft.EntityFrameworkCore" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Moq" />
<PackageReference Include="ReportGenerator.Core" />
<PackageReference Include="ReportGenerator.Core" VersionOverride="5.0.4"/>
<PackageReference Include="System.Linq.Async" />
<PackageReference Include="System.Reflection.Metadata" />
<PackageReference Include="Tmds.ExecFunction" />
Expand All @@ -27,8 +27,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Buffers" />
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Text.Encoding.CodePages" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.4" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<AssemblyName>coverletsamplelib.integration.template</AssemblyName>
<IsTestProject>false</IsTestProject>
Expand All @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit" Version="2.6.6"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
14 changes: 7 additions & 7 deletions test/coverlet.integration.tests/Msbuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void TestMsbuild_CoverletOutput_Folder_FileNameWithDoubleExtension()
public void Test_MultipleTargetFrameworkReport_NoCoverletOutput()
{
using ClonedTemplateProject clonedTemplateProject = PrepareTemplateProject();
string[] targetFrameworks = new string[] { "net6.0", "net7.0", "net8.0" };
string[] targetFrameworks = new string[] { "net6.0", "net8.0" };
UpdateProjectTargetFramework(clonedTemplateProject, targetFrameworks);
DotnetCli($"test -c {_buildConfiguration} \"{clonedTemplateProject.ProjectRootPath}\" /p:CollectCoverage=true /p:Include=\"[{ClonedTemplateProject.AssemblyName}]*DeepThought\" /p:IncludeTestAssembly=true", out string standardOutput, out string standardError, clonedTemplateProject.ProjectRootPath!);
if (!string.IsNullOrEmpty(standardError))
Expand All @@ -178,7 +178,7 @@ public void Test_MultipleTargetFrameworkReport_NoCoverletOutput()
public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder()
{
using ClonedTemplateProject clonedTemplateProject = PrepareTemplateProject();
string[] targetFrameworks = new string[] { "net6.0", "net7.0", "net8.0" };
string[] targetFrameworks = new string[] { "net6.0", "net8.0" };
UpdateProjectTargetFramework(clonedTemplateProject, targetFrameworks);
bool result = DotnetCli($"test -c {_buildConfiguration} \"{clonedTemplateProject.ProjectRootPath}\" /p:CollectCoverage=true /p:Include=\"[{ClonedTemplateProject.AssemblyName}]*DeepThought\" /p:IncludeTestAssembly=true /p:CoverletOutput=\"{clonedTemplateProject.ProjectRootPath}\"\\", out string standardOutput, out string standardError, clonedTemplateProject.ProjectRootPath!);
if (!string.IsNullOrEmpty(standardError))
Expand Down Expand Up @@ -206,7 +206,7 @@ public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder()
public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWithoutExtension()
{
using ClonedTemplateProject clonedTemplateProject = PrepareTemplateProject();
string[] targetFrameworks = new string[] { "net6.0", "net7.0", "net8.0" };
string[] targetFrameworks = new string[] { "net6.0", "net8.0" };
UpdateProjectTargetFramework(clonedTemplateProject, targetFrameworks);
DotnetCli($"test -c {_buildConfiguration} \"{clonedTemplateProject.ProjectRootPath}\" /p:CollectCoverage=true /p:Include=\"[{ClonedTemplateProject.AssemblyName}]*DeepThought\" /p:IncludeTestAssembly=true /p:CoverletOutput=\"{clonedTemplateProject.ProjectRootPath}\"\\file", out string standardOutput, out string standardError, clonedTemplateProject.ProjectRootPath!);
if (!string.IsNullOrEmpty(standardError))
Expand All @@ -232,11 +232,11 @@ public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWit
public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWithExtension_SpecifyFramework()
{
using ClonedTemplateProject clonedTemplateProject = PrepareTemplateProject();
string[] targetFrameworks = new string[] { "net6.0", "net7.0", "net8.0" };
string[] targetFrameworks = new string[] { "net6.0", "net8.0" };
UpdateProjectTargetFramework(clonedTemplateProject, targetFrameworks);
Assert.True(clonedTemplateProject.IsMultipleTargetFramework());
string[] frameworks = clonedTemplateProject.GetTargetFrameworks();
Assert.Equal(3, frameworks.Length);
Assert.Equal(targetFrameworks.Length, frameworks.Length);
string framework = frameworks.FirstOrDefault()!;
DotnetCli($"test -c {_buildConfiguration} -f {framework} \"{clonedTemplateProject.ProjectRootPath}\" /p:CollectCoverage=true /p:Include=\"[{ClonedTemplateProject.AssemblyName}]*DeepThought\" /p:IncludeTestAssembly=true /p:CoverletOutput=\"{clonedTemplateProject.ProjectRootPath}\"\\file.ext", out string standardOutput, out string standardError, clonedTemplateProject.ProjectRootPath!);
if (!string.IsNullOrEmpty(standardError))
Expand Down Expand Up @@ -269,7 +269,7 @@ public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWit
public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWithExtension()
{
using ClonedTemplateProject clonedTemplateProject = PrepareTemplateProject();
string[] targetFrameworks = new string[] { "net6.0", "net7.0", "net8.0" };
string[] targetFrameworks = new string[] { "net6.0", "net8.0" };
UpdateProjectTargetFramework(clonedTemplateProject, targetFrameworks);
DotnetCli($"test -c {_buildConfiguration} \"{clonedTemplateProject.ProjectRootPath}\" /p:CollectCoverage=true /p:Include=\"[{ClonedTemplateProject.AssemblyName}]*DeepThought\" /p:IncludeTestAssembly=true /p:CoverletOutput=\"{clonedTemplateProject.ProjectRootPath}\"\\file.ext", out string standardOutput, out string standardError, clonedTemplateProject.ProjectRootPath!);
if (!string.IsNullOrEmpty(standardError))
Expand All @@ -295,7 +295,7 @@ public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWit
public void Test_MultipleTargetFrameworkReport_CoverletOutput_Folder_FileNameWithDoubleExtension()
{
using ClonedTemplateProject clonedTemplateProject = PrepareTemplateProject();
string[] targetFrameworks = new string[] { "net6.0", "net7.0", "net8.0" };
string[] targetFrameworks = new string[] { "net6.0", "net8.0" };
UpdateProjectTargetFramework(clonedTemplateProject, targetFrameworks);
DotnetCli($"test -c {_buildConfiguration} \"{clonedTemplateProject.ProjectRootPath}\" /p:CollectCoverage=true /p:Include=\"[{ClonedTemplateProject.AssemblyName}]*DeepThought\" /p:IncludeTestAssembly=true /p:CoverletOutput=\"{clonedTemplateProject.ProjectRootPath}\"\\file.ext1.ext2", out string standardOutput, out string standardError, clonedTemplateProject.ProjectRootPath!);
if (!string.IsNullOrEmpty(standardError))
Expand Down
Loading