Skip to content

Commit eba916d

Browse files
committed
Merge branch 'feature/net10' into develop
2 parents 1d9b4bf + a584fa1 commit eba916d

7 files changed

Lines changed: 43 additions & 81 deletions

File tree

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"cake.tool": {
6-
"version": "5.1.0",
6+
"version": "6.0.0",
77
"commands": [
88
"dotnet-cake"
99
]

Source/HttpMultipartParser.Benchmark/HttpMultipartParser.Benchmark.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="BenchmarkDotNet" Version="0.15.2" />
9+
<PackageReference Include="BenchmarkDotNet" Version="0.15.6" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

Source/HttpMultipartParser.UnitTests/HttpMultipartParser.UnitTests.csproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net48;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net48;net10.0</TargetFrameworks>
55
<AssemblyName>HttpMultipartParser.UnitTests</AssemblyName>
66
<RootNamespace>HttpMultipartParser.UnitTests</RootNamespace>
77
<IsPackable>false</IsPackable>
88
<IsTestProject>true</IsTestProject>
99
<OutputType>Exe</OutputType>
1010
</PropertyGroup>
1111

12-
<!-- Enable the MSTest runner -->
1312
<PropertyGroup>
14-
<EnableMSTestRunner>true</EnableMSTestRunner>
15-
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
13+
<!--
14+
UseMicrosoftTestingPlatformRunner continues to be necessary for .NET 10, because this flag has nothing to do with dotnet test.
15+
It changes how dotnet run works, which is completely independent of dotnet test.
16+
https://github.com/xunit/xunit/issues/3421
17+
-->
1618
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1719
</PropertyGroup>
1820

1921
<ItemGroup>
20-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
21-
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.14.2" />
22-
<PackageReference Include="xunit.v3" Version="3.0.1" />
22+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
23+
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
24+
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.0" />
2325
</ItemGroup>
2426

2527
<ItemGroup>

Source/HttpMultipartParser.sln

Lines changed: 0 additions & 51 deletions
This file was deleted.

Source/HttpMultipartParser.slnx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Solution>
2+
<Folder Name="/Solution Items/">
3+
<File Path="../README.md" />
4+
</Folder>
5+
<Project Path="HttpMultipartParser/HttpMultipartParser.csproj" />
6+
<Project Path="HttpMultipartParser.Benchmark/HttpMultipartParser.Benchmark.csproj" />
7+
<Project Path="HttpMultipartParser.UnitTests/HttpMultipartParser.UnitTests.csproj" />
8+
</Solution>

build.cake

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Install tools.
2-
#tool dotnet:?package=GitVersion.Tool&version=6.4.0
2+
#tool dotnet:?package=GitVersion.Tool&version=6.5.0
33
#tool nuget:?package=GitReleaseManager&version=0.20.0
4-
#tool nuget:?package=ReportGenerator&version=5.4.17
4+
#tool nuget:?package=ReportGenerator&version=5.5.0
55
#tool nuget:?package=xunit.runner.console&version=2.9.3
66
#tool nuget:?package=CodecovUploader&version=0.8.0
77

@@ -44,7 +44,7 @@ var codeCoverageDir = $"{outputDir}CodeCoverage/";
4444
var benchmarkDir = $"{outputDir}Benchmark/";
4545
var coverageFile = $"{codeCoverageDir}coverage.xml";
4646

47-
var solutionFile = $"{sourceFolder}{gitHubRepoName}.sln";
47+
var solutionFile = $"{sourceFolder}{gitHubRepoName}.slnx";
4848
var sourceProject = $"{sourceFolder}{gitHubRepoName}/{gitHubRepoName}.csproj";
4949
var integrationTestsProject = $"{sourceFolder}{gitHubRepoName}.IntegrationTests/{gitHubRepoName}.IntegrationTests.csproj";
5050
var unitTestsProject = $"{sourceFolder}{gitHubRepoName}.UnitTests/{gitHubRepoName}.UnitTests.csproj";
@@ -68,13 +68,14 @@ var removeBenchmarks = isBenchmarkProjectPresent && !isLocalBuild;
6868
var publishingError = false;
6969

7070
// A single framework is sufficient when calculating code coverage.
71-
const string DESIRED_FRAMEWORK_FOR_CODE_COVERAGE = "net9.0";
71+
const string DESIRED_FRAMEWORK_FOR_CODE_COVERAGE = "net10.0";
7272

7373
// The terminal logger introduced but turned off by default in .NET8 and turned on by default in .NET9
7474
// doesn't work right on Linux and causes a lot of noise in the build log on Ubuntu in AppVeyor.
7575
// As of March 2025, the terminal logger doesn't seem to work right on Windows in AppVeyor either.
7676
// Therefore I am enabling it when building on my machine and turning it off in any other environment.
77-
var terminalLogger = (isLocalBuild && IsRunningOnWindows()) ? "on" : "off";
77+
var enableTerminalLogger = isLocalBuild && IsRunningOnWindows();
78+
var terminalLogger = enableTerminalLogger ? "on" : "off";
7879

7980

8081
///////////////////////////////////////////////////////////////////////////////
@@ -236,13 +237,14 @@ Task("Run-Unit-Tests")
236237
.IsDependentOn("Build")
237238
.Does(() =>
238239
{
239-
DotNetTest(unitTestsProject, new DotNetTestSettings
240+
DotNetTest(null, new DotNetTestSettings
240241
{
241242
NoBuild = true,
242243
NoRestore = true,
243244
Configuration = configuration,
244245
ArgumentCustomization = args => args
245-
.Append($"-tl:{terminalLogger}")
246+
.Append($"--project {unitTestsProject}")
247+
.Append(enableTerminalLogger ? "" : "--no-progress")
246248
});
247249
});
248250

@@ -251,24 +253,22 @@ Task("Run-Code-Coverage")
251253
.IsDependentOn("Build")
252254
.Does(() =>
253255
{
254-
var testSettings = new DotNetTestSettings
256+
DotNetTest(null, new DotNetTestSettings
255257
{
256258
NoBuild = true,
257259
NoRestore = true,
258260
Configuration = configuration,
259261
Framework = DESIRED_FRAMEWORK_FOR_CODE_COVERAGE,
260262

261-
// The following assumes that coverlet.msbuild has been added to the unit testing project
262263
ArgumentCustomization = args => args
263-
.Append($"-tl:{terminalLogger}")
264+
.Append($"--project {unitTestsProject}")
265+
.Append(enableTerminalLogger ? "" : "--no-progress")
264266
.Append("--")
265267
.Append("--coverage")
266268
.Append("--coverage-output-format xml")
267269
.Append($"--coverage-output {MakeAbsolute(new FilePath(coverageFile))}")
268270
.Append($"--coverage-settings {MakeAbsolute(new FilePath("CodeCoverage.runsettings"))}")
269-
};
270-
271-
DotNetTest(unitTestsProject, testSettings);
271+
});
272272
});
273273

274274
Task("Upload-Coverage-Result-Codecov")
@@ -501,7 +501,7 @@ RunTarget(target);
501501
///////////////////////////////////////////////////////////////////////////////
502502
// PRIVATE METHODS
503503
///////////////////////////////////////////////////////////////////////////////
504-
private static string TrimStart(this string source, string value, StringComparison comparisonType)
504+
static string TrimStart(this string source, string value, StringComparison comparisonType)
505505
{
506506
if (source == null)
507507
{
@@ -518,20 +518,20 @@ private static string TrimStart(this string source, string value, StringComparis
518518
return source.Substring(startIndex);
519519
}
520520

521-
private static List<string> ExecuteCommand(this ICakeContext context, FilePath exe, string args)
521+
static List<string> ExecuteCommand(this ICakeContext context, FilePath exe, string args)
522522
{
523523
context.StartProcess(exe, new ProcessSettings { Arguments = args, RedirectStandardOutput = true }, out var redirectedOutput);
524524

525525
return redirectedOutput.ToList();
526526
}
527527

528-
private static List<string> ExecGitCmd(this ICakeContext context, string cmd)
528+
static List<string> ExecGitCmd(this ICakeContext context, string cmd)
529529
{
530530
var gitExe = context.Tools.Resolve(context.IsRunningOnWindows() ? "git.exe" : "git");
531531
return context.ExecuteCommand(gitExe, cmd);
532532
}
533533

534-
private static string GetBuildBranch(this ICakeContext context)
534+
static string GetBuildBranch(this ICakeContext context)
535535
{
536536
var buildSystem = context.BuildSystem();
537537
string repositoryBranch = null;
@@ -550,7 +550,7 @@ private static string GetBuildBranch(this ICakeContext context)
550550
return repositoryBranch;
551551
}
552552

553-
private static string GetRepoName(this ICakeContext context)
553+
static string GetRepoName(this ICakeContext context)
554554
{
555555
var buildSystem = context.BuildSystem();
556556

@@ -564,7 +564,7 @@ private static string GetRepoName(this ICakeContext context)
564564
return $"{parts[parts.Length - 2]}/{parts[parts.Length - 1].Replace(".git", "")}";
565565
}
566566

567-
private static void UpdateProjectTarget(this ICakeContext context, string path, string desiredTarget)
567+
static void UpdateProjectTarget(this ICakeContext context, string path, string desiredTarget)
568568
{
569569
var peekSettings = new XmlPeekSettings { SuppressWarning = true };
570570
foreach(var projectFile in context.GetFiles(path))

global.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"sdk": {
3-
"version": "9.0.305",
3+
"version": "10.0.100",
44
"rollForward": "patch",
55
"allowPrerelease": false
6+
},
7+
"test": {
8+
"runner": "Microsoft.Testing.Platform"
69
}
710
}

0 commit comments

Comments
 (0)