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/";
4444var benchmarkDir = $"{outputDir}Benchmark/" ;
4545var coverageFile = $"{codeCoverageDir}coverage.xml" ;
4646
47- var solutionFile = $"{sourceFolder}{gitHubRepoName}.sln " ;
47+ var solutionFile = $"{sourceFolder}{gitHubRepoName}.slnx " ;
4848var sourceProject = $"{sourceFolder}{gitHubRepoName}/{gitHubRepoName}.csproj" ;
4949var integrationTestsProject = $"{sourceFolder}{gitHubRepoName}.IntegrationTests/{gitHubRepoName}.IntegrationTests.csproj" ;
5050var unitTestsProject = $"{sourceFolder}{gitHubRepoName}.UnitTests/{gitHubRepoName}.UnitTests.csproj" ;
@@ -68,13 +68,14 @@ var removeBenchmarks = isBenchmarkProjectPresent && !isLocalBuild;
6868var 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
274274Task( "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 ) )
0 commit comments