From 3f8ec9a249cff70b22a81583a903135691b9019a Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Tue, 11 Aug 2026 21:16:17 -0700 Subject: [PATCH 1/5] Implement Central Package Management --- .github/workflows/NUnit.Engine.Api.CI.yml | 12 +++++++++- Directory.Packages.props | 20 ++++++++++++++++ NuGet.config | 23 ++++++++++++++----- build.cake | 6 ++--- src/Directory.Build.props | 16 +++++-------- .../NUnit.Engine.Api.Tests.csproj | 4 ++-- src/NUnit.Engine.Api/NUnit.Engine.Api.csproj | 2 +- 7 files changed, 60 insertions(+), 23 deletions(-) create mode 100644 Directory.Packages.props diff --git a/.github/workflows/NUnit.Engine.Api.CI.yml b/.github/workflows/NUnit.Engine.Api.CI.yml index b1f712d..a5c2673 100644 --- a/.github/workflows/NUnit.Engine.Api.CI.yml +++ b/.github/workflows/NUnit.Engine.Api.CI.yml @@ -43,8 +43,18 @@ jobs: - name: 🛠️ Install dotnet tools run: dotnet tool restore + # For reasons I don't understand, the Cake script doesn't work in a workflow + # unless they are restored before the script runs, which this command does. + - name: 🛠️ List Packages + run: dotnet list package --include-transitive + - name: 🔨 Build, Test, Package and Publish (Cake script decides) - run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic + #run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic + uses: cake-build/cake-action@v3 + with: + target: ContinuousIntegration + configuration: Release + #verbosity: diagnostic # Upload packages - name: 💾 Upload Packages diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..787f040 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,20 @@ + + + + true + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NuGet.config b/NuGet.config index e34c2df..5a82da7 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,9 +1,20 @@  - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build.cake b/build.cake index 1642846..0990694 100644 --- a/build.cake +++ b/build.cake @@ -1,7 +1,7 @@ // Load the recipe -#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.4.7 +#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.4.8 // Comment out above line and uncomment below for local tests of recipe changes -//#load ../NUnit.Cake.Recipe/src/NUnit.Cake.Recipe/content/*.cake +//#load ../NUnit.Cake.Recipe/recipe/*.cake // Initialize BuildSettings BuildSettings.Initialize( @@ -22,7 +22,7 @@ BuildSettings.Packages.Add(new NuGetPackage( HasFile("LICENSE.txt"), HasDirectory("lib/net462").WithFile("nunit.engine.api.dll"), HasDirectory("lib/netstandard2.0").WithFile("nunit.engine.api.dll"), - HasDependency("NUnit.Extensibility.Api", "4.0.0-beta.2.2") + HasDependency("NUnit.Extensibility.Api", "4.0.0-beta.3") }, symbols: new PackageCheck[] { HasDirectory("lib/net462").WithFile("nunit.engine.api.pdb"), diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 74c2f6f..6c1d1d4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,10 +22,6 @@ portable true - - 8.0.0 - 4.0.0-beta.2.2 - 4.3.2 NUnit Software NUnit 4 Runner and Engine @@ -36,13 +32,13 @@ - - + + - - + + @@ -72,9 +68,9 @@ - + - + diff --git a/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj b/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj index 36f6a23..8e9a14a 100644 --- a/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj +++ b/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj b/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj index 39cea70..5b1ebfc 100644 --- a/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj +++ b/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj @@ -13,7 +13,7 @@ - + From c622c1497f5b225772a1c01f87d87c72c97a4bfe Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Thu, 13 Aug 2026 21:53:44 -0700 Subject: [PATCH 2/5] Demonstrates failure without pre-loading dependencies --- .github/workflows/NUnit.Engine.Api.CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/NUnit.Engine.Api.CI.yml b/.github/workflows/NUnit.Engine.Api.CI.yml index a5c2673..424e0c5 100644 --- a/.github/workflows/NUnit.Engine.Api.CI.yml +++ b/.github/workflows/NUnit.Engine.Api.CI.yml @@ -45,8 +45,8 @@ jobs: # For reasons I don't understand, the Cake script doesn't work in a workflow # unless they are restored before the script runs, which this command does. - - name: 🛠️ List Packages - run: dotnet list package --include-transitive + #- name: 🛠️ List Packages + # run: dotnet list package --include-transitive - name: 🔨 Build, Test, Package and Publish (Cake script decides) #run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic From f7c5e5482d4898fa233d1074e44e76196d7ae81f Mon Sep 17 00:00:00 2001 From: Manfred Brands Date: Fri, 14 Aug 2026 15:08:31 +0800 Subject: [PATCH 3/5] Try wildcard match as last package source mapping --- NuGet.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5a82da7..070476e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,14 +7,14 @@ - - - + + + - \ No newline at end of file + From 7c6f74d62034e7eac11a135249a48c63f102d111 Mon Sep 17 00:00:00 2001 From: Manfred Brands Date: Fri, 14 Aug 2026 15:24:36 +0800 Subject: [PATCH 4/5] add verbosity to cake --- .github/workflows/NUnit.Engine.Api.CI.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/NUnit.Engine.Api.CI.yml b/.github/workflows/NUnit.Engine.Api.CI.yml index 424e0c5..38f7436 100644 --- a/.github/workflows/NUnit.Engine.Api.CI.yml +++ b/.github/workflows/NUnit.Engine.Api.CI.yml @@ -49,12 +49,7 @@ jobs: # run: dotnet list package --include-transitive - name: 🔨 Build, Test, Package and Publish (Cake script decides) - #run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic - uses: cake-build/cake-action@v3 - with: - target: ContinuousIntegration - configuration: Release - #verbosity: diagnostic + run: dotnet cake --target=ContinuousIntegration --configuration=Release --verbosity=diagnostic # Upload packages - name: 💾 Upload Packages From 127c1b5f07ed54045757d47fb671fa6753879979 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Fri, 14 Aug 2026 03:19:47 -0700 Subject: [PATCH 5/5] Redefine Restore Task --- build.cake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.cake b/build.cake index 0990694..cc0fffc 100644 --- a/build.cake +++ b/build.cake @@ -38,6 +38,13 @@ Task("BuildPackages") package.BuildPackage(); }); +// Temporary task redefinitions for testing changes to the recipe. +Redefine(BuildTasks.RestoreTask) + .Does(() => + { + DotNetRestore(); + }); + ////////////////////////////////////////////////////////////////////// // CONSOLE PACKAGE TEST RUNNER //////////////////////////////////////////////////////////////////////