Skip to content

Commit

Permalink
Update System.Text.Json version (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertk authored Nov 18, 2024
1 parent 3004bb7 commit de1a30a
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 47 deletions.
15 changes: 8 additions & 7 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
</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.146" />
</ItemGroup>
<ItemGroup>
<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.Build.Locator" Version="1.7.8" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<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 @@ -44,16 +44,17 @@
<PackageVersion Include="System.Configuration.ConfigurationManager" 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="Tmds.ExecFunction" Version="0.8.0" />
<PackageVersion Include="xunit" Version="2.6.6" />
<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="System.Security.Cryptography.Pkcs" Version="6.0.4" />
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="6.0.5" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
</Project>
9 changes: 2 additions & 7 deletions eng/azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ 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.428
displayName: Install .NET Core SDK 6.0.428

- task: UseDotNet@2
inputs:
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.428
displayName: Install .NET Core SDK 6.0.428

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

# 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.111"
}
}
11 changes: 6 additions & 5 deletions src/coverlet.core/coverlet.core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
Expand All @@ -8,17 +8,18 @@

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="6.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyModel" VersionOverride="6.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyModel" VersionOverride="6.0.2"/>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" VersionOverride="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" VersionOverride="6.0.1"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" VersionOverride="6.0.2"/>
<PackageReference Include="Mono.Cecil" />
<PackageReference Include="NuGet.Versioning" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Text.Json" VersionOverride="6.0.11" />
</ItemGroup>

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

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
2 changes: 1 addition & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<NoWarn>$(NoWarn);NU1301;IDE0007</NoWarn>
<NoWarn>$(NoWarn);NU1301;IDE0007;IDE0008</NoWarn>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions test/coverlet.collector.tests/coverlet.collector.tests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(RepoRoot)src\coverlet.msbuild.tasks\coverlet.msbuild.props" />

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

Expand Down
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</TargetFrameworks>
<IsPackable>false</IsPackable>
<AssemblyName>coverletsamplelib.integration.template</AssemblyName>
<IsTestProject>false</IsTestProject>
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(2, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
Expand All @@ -15,7 +15,7 @@
<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="System.Security.Cryptography.Pkcs" Version="6.0.4" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
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</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsTestProject>true</IsTestProject>
Expand Down
3 changes: 0 additions & 3 deletions test/coverlet.tests.utils/TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ public static string GetAssemblyTargetFramework()
#if NET6_0
return "net6.0";
#endif
#if NET7_0
return "net7.0";
#endif
#if NET8_0
return "net8.0";
#endif
Expand Down
2 changes: 1 addition & 1 deletion test/coverlet.tests.utils/coverlet.tests.utils.csproj
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</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<SignAssembly>False</SignAssembly>
Expand Down

0 comments on commit de1a30a

Please sign in to comment.