From 7259d5c93f36883ac7a75da951186e49bcd6b928 Mon Sep 17 00:00:00 2001 From: Create Pull Request Task Date: Wed, 22 Nov 2023 07:06:21 +0000 Subject: [PATCH 01/11] Automatic NuGet package update 24416230 --- Directory.Packages.props | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index eb30cd1c..c5306a6b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,30 +7,30 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - - + + From ff636a0f4db2fec9006b4168f6c9a37ab047a797 Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:33:43 +0000 Subject: [PATCH 02/11] Roll back Net8 updates for now --- Directory.Packages.props | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c5306a6b..e073fc83 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,30 +7,30 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + From 92dcbede6ab71f9df2f5eeca78558edf30fbb0ed Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:34:11 +0000 Subject: [PATCH 03/11] Apply suggestions from code review --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index e073fc83..89529c7a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -29,8 +29,8 @@ - - + + From 069d4a4e7ce22b54a6c4d45c10b656c46a212859 Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:25:48 +0000 Subject: [PATCH 04/11] Update target and SDK version --- Directory.Build.props | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 220784c8..f8ab5a10 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ - net7.0 + net7.0;net8.0 netstandard2.0 $(NetCoreVersions);$(NetStandardVersions) $(NetCoreVersions) diff --git a/global.json b/global.json index a60fcf56..d07970ac 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.404", + "version": "8.0.100", "rollForward": "latestMajor" } } From 15866c2290628877f1002c886bde0d2940d4a2fc Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:28:51 +0000 Subject: [PATCH 05/11] update gh workflow build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b144c4a..c5a670a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' # Install SF SDK - name: Install SF shell: pwsh From 88bd85860c34d1abc7406e5483a9f35e92f5af6a Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:29:39 +0000 Subject: [PATCH 06/11] update gh codeql workflow build --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e6d87835..214f7fb9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v4 - uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From d946fa6671bb24452e552451503aba43731540e0 Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:37:51 +0000 Subject: [PATCH 07/11] Add temporary SDK install to yml builds --- .github/pipelines/dotnet-initialize.yml | 4 ++++ .github/pipelines/github-semmle.yml | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/pipelines/dotnet-initialize.yml b/.github/pipelines/dotnet-initialize.yml index bfc7d55c..f776f2cb 100644 --- a/.github/pipelines/dotnet-initialize.yml +++ b/.github/pipelines/dotnet-initialize.yml @@ -10,6 +10,10 @@ parameters: steps: - task: NuGetAuthenticate@1 displayName: NuGet Authenticate + - task: UseDotNet@2 + displayName: Temporarily install .NET 7 SDK while dual targeting + inputs: + version: "7.0.404" - task: UseDotNet@2 displayName: Use .NET SDK from global.json inputs: diff --git a/.github/pipelines/github-semmle.yml b/.github/pipelines/github-semmle.yml index 90128978..6d59a224 100644 --- a/.github/pipelines/github-semmle.yml +++ b/.github/pipelines/github-semmle.yml @@ -36,7 +36,11 @@ extends: - checkout: self clean: true - task: UseDotNet@2 - displayName: Use .NET Core + displayName: Temporarily install .NET 7 SDK while dual targeting + inputs: + version: "7.0.404" + - task: UseDotNet@2 + displayName: Use .NET SDK from global.json inputs: useGlobalJson: true - task: securedevelopmentteam.vss-secure-development-tools.build-task-semmle.Semmle@1 From 1bcaa037daedb27cfe3f5971c2ea1e2f6aa903d6 Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:42:38 +0000 Subject: [PATCH 08/11] re-add net8 updates --- Directory.Packages.props | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 89529c7a..c5306a6b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,30 +7,30 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + From 422c3a6e2fd533aec466f7a7ad3cb5f71e085db8 Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:13:38 +0000 Subject: [PATCH 09/11] update devcontainer to install latest .NET SDK --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e7cdedbd..65f311d2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,5 +18,8 @@ } }, - "remoteUser": "vscode" + "remoteUser": "vscode", + "features": { + "ghcr.io/devcontainers/features/dotnet:2": {} + } } From f02b2d73e836c683cf56c09801257925fb697fe9 Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:15:00 +0000 Subject: [PATCH 10/11] fix static analysis build error --- .../Middlewares/ResponseHeadersMiddleware.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hosting.Services.Web/Middlewares/ResponseHeadersMiddleware.cs b/src/Hosting.Services.Web/Middlewares/ResponseHeadersMiddleware.cs index b5908632..285e08a5 100644 --- a/src/Hosting.Services.Web/Middlewares/ResponseHeadersMiddleware.cs +++ b/src/Hosting.Services.Web/Middlewares/ResponseHeadersMiddleware.cs @@ -23,8 +23,8 @@ Task IMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) private Task SetResponseHeaders(object state) { HttpResponse response = (HttpResponse)state; - response.Headers.Add("X-Machine", m_context.MachineId); - response.Headers.Add("X-BuildVersion", m_context.BuildVersion); //Renamed from X-OfficeVersion + response.Headers.Append("X-Machine", m_context.MachineId); + response.Headers.Append("X-BuildVersion", m_context.BuildVersion); //Renamed from X-OfficeVersion return Task.CompletedTask; } From ba06d2666052d8b16d2651cf5127764f6166593e Mon Sep 17 00:00:00 2001 From: Keith Cully <2370032+K-Cully@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:28:23 +0000 Subject: [PATCH 11/11] fix static analysis error --- .../Middlewares/ObsoleteCorrelationHeadersMiddlewareTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Hosting.Services.Web.UnitTests/Middlewares/ObsoleteCorrelationHeadersMiddlewareTests.cs b/tests/Hosting.Services.Web.UnitTests/Middlewares/ObsoleteCorrelationHeadersMiddlewareTests.cs index 4d44f40c..8adef968 100644 --- a/tests/Hosting.Services.Web.UnitTests/Middlewares/ObsoleteCorrelationHeadersMiddlewareTests.cs +++ b/tests/Hosting.Services.Web.UnitTests/Middlewares/ObsoleteCorrelationHeadersMiddlewareTests.cs @@ -36,7 +36,7 @@ public async Task SetsObsoleteCorrelationIdFromHeaderToActivity(string correlati { // Arrange Guid obsoleteCorrelation = Guid.NewGuid(); - TestHttpContext.Request.Headers.Add(correlationName, obsoleteCorrelation.ToString()); + TestHttpContext.Request.Headers.Append(correlationName, obsoleteCorrelation.ToString()); // Act await TestMiddleware.InvokeAsync(TestHttpContext, DummyDelegate);