From 682a846b72773f243928bad17d905642a562414a Mon Sep 17 00:00:00 2001 From: Orion Edwards Date: Mon, 2 Feb 2026 09:11:50 +1300 Subject: [PATCH 1/4] Bring across changes from Server Net10 --- build/_build.csproj | 2 +- .../Octopus.Client.E2ETests.csproj | 4 ++-- .../Integration/HttpIntegrationTestBase.cs | 4 ++-- .../Octopus.Client.Tests/Octopus.Client.Tests.csproj | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/_build.csproj b/build/_build.csproj index 94be472cc..d688cbe16 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 CS0649;CS0169 .. diff --git a/source/Octopus.Client.E2ETests/Octopus.Client.E2ETests.csproj b/source/Octopus.Client.E2ETests/Octopus.Client.E2ETests.csproj index 8e7a3bf13..dd89b4ece 100644 --- a/source/Octopus.Client.E2ETests/Octopus.Client.E2ETests.csproj +++ b/source/Octopus.Client.E2ETests/Octopus.Client.E2ETests.csproj @@ -11,11 +11,11 @@ - net8.0 + net10.0 - net8.0;net462;net48 + net10.0;net8.0;net462;net48 diff --git a/source/Octopus.Client.Tests/Integration/HttpIntegrationTestBase.cs b/source/Octopus.Client.Tests/Integration/HttpIntegrationTestBase.cs index 2e2e867a8..992705c08 100644 --- a/source/Octopus.Client.Tests/Integration/HttpIntegrationTestBase.cs +++ b/source/Octopus.Client.Tests/Integration/HttpIntegrationTestBase.cs @@ -87,9 +87,9 @@ private static X509Certificate2 GetCert() using (var ms = new MemoryStream()) { s.CopyTo(ms); -#pragma warning disable PC001 +#pragma warning disable SYSLIB0057 // Use X509CertificateLoader instead of new X509Certificate2 return new X509Certificate2(ms.ToArray(), "password"); -#pragma warning restore PC001 +#pragma warning restore SYSLIB0057 } } diff --git a/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj b/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj index bff40c03c..c64137262 100644 --- a/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj +++ b/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj @@ -14,11 +14,11 @@ - net8.0 + net10.0 - net8.0;net462;net48 + net10.0;net8.0;net462;net48 @@ -26,7 +26,7 @@ win7-x86 - + $(DefineConstants);HTTP_CLIENT_SUPPORTS_SSL_OPTIONS @@ -45,8 +45,8 @@ - - + + From 3efc66333e8bae53424a0f70e06d3bf996fadae7 Mon Sep 17 00:00:00 2001 From: Orion Edwards Date: Mon, 2 Feb 2026 09:16:25 +1300 Subject: [PATCH 2/4] Install both net8 and net10 --- .github/workflows/main.yaml | 17 ++++++++++++----- global.json | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 119f4df92..2e0d6f67b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -42,10 +42,15 @@ jobs: with: fetch-depth: 0 # all - - name: Setup .NET 8.0 + # At the moment we build using the net10 toolchain but test on net462, net48 and net80. + # We publish packages for net462, net48 and net80 + # The Tests run on net10 as part of the Octopus Server build pipeline separately. + - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: | + 8.0.x + 10.0.x - name: Append OCTOVERSION_CurrentBranch with -nightly (for scheduled) if: github.event_name == 'schedule' @@ -149,12 +154,14 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Setup .NET 8 + - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: | + 8.0.x + 10.0.x - - name: Run unit tests 🏗 + - name: Run unit tests (net8.0) 🏗 shell: bash run: dotnet test ./source/Octopus.Client.Tests/Octopus.Client.Tests.csproj --framework net8.0 --configuration:Release --logger:"trx;LogFilePrefix=Linux" --results-directory ./TestResults diff --git a/global.json b/global.json index 391ba3c2a..067010d79 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.102", "rollForward": "latestFeature" } } From fdf955ed47ae3c880fef21cbe15cd9711c3c968c Mon Sep 17 00:00:00 2001 From: Orion Edwards Date: Mon, 2 Feb 2026 09:37:43 +1300 Subject: [PATCH 3/4] Nuke build needs to go to 9.0 or 10.0 because BinaryFormatterSerialization was removed. Let's go to the latest 10.1.0 --- build/Build.cs | 9 ++------- build/_build.csproj | 4 +--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index a7d96f2e9..1438e672e 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -210,11 +210,7 @@ class Build : NukeBuild DotNetPack(_ => _ .SetProject(OctopusClientFolder) - .SetProcessArgumentConfigurator(args => - { - args.Add($"/p:NuspecFile=Octopus.Client.nuspec"); - return args; - }) + .SetProcessAdditionalArguments("/p:NuspecFile=Octopus.Client.nuspec") .SetVersion(FullSemVer) .SetConfiguration(Configuration) .SetOutputDirectory(ArtifactsDir) @@ -361,12 +357,11 @@ void SignWithAzureSignTool(AbsolutePath[] files, string timestampUrl) .SetFiles(files.Select(x => x.ToString()))); } + // Note: this only works on Windows void SignWithSignTool(AbsolutePath[] files, string url) { Log.Information("Signing files using signtool."); - SignToolLogger = LogStdErrAsWarning; - SignTool(_ => _ .SetFile(SigningCertificatePath) .SetPassword(SigningCertificatePassword) diff --git a/build/_build.csproj b/build/_build.csproj index d688cbe16..3797192e6 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -8,8 +8,6 @@ .. .. 1 - - true @@ -17,7 +15,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + From ceb8a1e898069c1e083a6f66702a7f7da71fc839 Mon Sep 17 00:00:00 2001 From: Orion Edwards Date: Mon, 2 Feb 2026 12:22:21 +1300 Subject: [PATCH 4/4] Fix GetRuntime regex, and fix a missed dependency update for Microsoft.AspNetCore.Owin --- build/Build.cs | 1 + source/Octopus.Client.E2ETests/TestHelpers.cs | 2 +- source/Octopus.Client.Tests/Octopus.Client.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index 1438e672e..b23079924 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -163,6 +163,7 @@ class Build : NukeBuild .SetProjectFile(testProjectFile) .SetConfiguration(Configuration) .EnableNoBuild() + .AddProcessAdditionalArguments("/m:1") // force msbuild to only spawn one process at a time, which stops the tests running in parallel (HttpIntegrationTestBase hardcodes a TCP port number so must run sequentially) .SetLoggers("trx;LogFilePrefix=Win") .SetResultsDirectory("./TestResults/")); }); diff --git a/source/Octopus.Client.E2ETests/TestHelpers.cs b/source/Octopus.Client.E2ETests/TestHelpers.cs index 6bb9139b0..b3fd938bd 100644 --- a/source/Octopus.Client.E2ETests/TestHelpers.cs +++ b/source/Octopus.Client.E2ETests/TestHelpers.cs @@ -21,7 +21,7 @@ internal static string GetNuGetPackage() internal static string GetRuntime() { var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().FullLocalPath()); - var runtime = Regex.Replace(new DirectoryInfo(path).Name, @"net\d\.\d", "netstandard2.0"); + var runtime = Regex.Replace(new DirectoryInfo(path).Name, @"net\d+\.\d+", "netstandard2.0"); return runtime; } } diff --git a/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj b/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj index c64137262..5e559a978 100644 --- a/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj +++ b/source/Octopus.Client.Tests/Octopus.Client.Tests.csproj @@ -44,7 +44,7 @@ - +