From 58f17009b95ce7ea96be62cd42d5062bc967325a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Oct 2026 22:31:16 +0000 Subject: [PATCH 1/9] Initial plan From 22bd888002657d656316d3f35534096f462d1266 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Oct 2026 22:34:06 +0000 Subject: [PATCH 2/9] Update build to .NET 10 SDK Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 2 +- README.md | 4 ++-- global.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cc17c531c..0ccbd0f6a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -FROM mcr.microsoft.com/dotnet/sdk:8.0 +FROM mcr.microsoft.com/dotnet/sdk:10.0 RUN pwsh --command Install-Module platyPS,Pester -Force \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dbbc9c7ee..f2528912e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ // For format details, see https://aka.ms/vscode-remote/devcontainer.json { - "name": "C# (.NET 8.0)", + "name": "C# (.NET 10.0)", "dockerFile": "Dockerfile", "customizations": { "vscode": { diff --git a/README.md b/README.md index 1d2252082..2a82af89d 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,9 @@ To install **PSScriptAnalyzer** from source code: ### Requirements -- [Latest .NET 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) +- [Latest .NET 10.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) - If building for Windows PowerShell versions, then the .NET Framework 4.6.2 [targeting pack](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net462) (also referred to as developer/targeting pack) need to be installed. This is only possible on Windows. -- Optional but recommended for development: [Visual Studio 2022](https://www.visualstudio.com/downloads) +- Optional but recommended for development: [Visual Studio 2026](https://www.visualstudio.com/downloads) - Or [Visual Studio Code](https://code.visualstudio.com/download) - [Pester v6 PowerShell module, available on PowerShell Gallery](https://github.com/pester/Pester) - [PlatyPS PowerShell module, available on PowerShell Gallery](https://github.com/PowerShell/platyPS/releases) diff --git a/global.json b/global.json index de3e16bd7..99bfe4cad 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.419", + "version": "10.0.401", "rollForward": "latestFeature" } } From 4ac69848e647762a98ab7f50500e0326317d60ab Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 28 Oct 2026 07:20:09 +0000 Subject: [PATCH 3/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a82af89d..95907c650 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ To install **PSScriptAnalyzer** from source code: - [Latest .NET 10.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) - If building for Windows PowerShell versions, then the .NET Framework 4.6.2 [targeting pack](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net462) (also referred to as developer/targeting pack) need to be installed. This is only possible on Windows. -- Optional but recommended for development: [Visual Studio 2026](https://www.visualstudio.com/downloads) +- Optional but recommended for development: [Visual Studio](https://www.visualstudio.com/downloads) - Or [Visual Studio Code](https://code.visualstudio.com/download) - [Pester v6 PowerShell module, available on PowerShell Gallery](https://github.com/pester/Pester) - [PlatyPS PowerShell module, available on PowerShell Gallery](https://github.com/PowerShell/platyPS/releases) From 77ac9a2060704cedaad2fad54a7dc1e48f344137 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Oct 2026 07:27:11 +0000 Subject: [PATCH 4/9] Allow NuGet targeting pack restore in CI Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com> --- NuGet.Config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NuGet.Config b/NuGet.Config index f003b0fbd..d88f8894f 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -3,5 +3,15 @@ + + + + + + + + + + From 12eec6aa6790020d1df836370ed15ce4a5d12580 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 28 Oct 2026 11:12:11 +0000 Subject: [PATCH 5/9] Add Microsoft.WindowsDesktop.App.Ref package source Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- NuGet.Config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.Config b/NuGet.Config index d88f8894f..28b96b2b6 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -12,6 +12,7 @@ + From b0be65a7e43b605d1fb172f71369cd4c28f5b092 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Oct 2026 11:54:20 +0000 Subject: [PATCH 6/9] Raise minimum PowerShell Core version to 7.6.6 Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com> --- Engine/PSScriptAnalyzer.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/PSScriptAnalyzer.psm1 b/Engine/PSScriptAnalyzer.psm1 index 50348fa75..780c63d7c 100644 --- a/Engine/PSScriptAnalyzer.psm1 +++ b/Engine/PSScriptAnalyzer.psm1 @@ -9,8 +9,8 @@ $PSModuleRoot = $PSModule.ModuleBase # Import the appropriate nested binary module based on the current PowerShell version $binaryModuleRoot = $PSModuleRoot -# This should be the equivalent of 7.4.x i.e. latest major/minor supported but lowest patch. -[Version] $minimumPowerShellCoreVersion = '7.4.6' +# This should be the equivalent of 7.6.x i.e. latest major/minor supported but lowest patch. +[Version] $minimumPowerShellCoreVersion = '7.6.6' if ($PSVersionTable.PSVersion.Major -ge 6) { $binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath "PSv$($PSVersionTable.PSVersion.Major)" # Minimum PowerShell Core version given by PowerShell Core support itself and From 4b51b0039cebd9b49ef3688f9ec131fb9da27800 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Oct 2026 12:26:36 +0000 Subject: [PATCH 7/9] Retarget PowerShell 7 build to .NET 10 Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com> --- Directory.Packages.props | 2 +- Engine/Engine.csproj | 10 +++++----- Engine/PSScriptAnalyzer.psm1 | 4 ++-- Rules/Rules.csproj | 6 +++--- build.psm1 | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index bd8565ee8..615ee267a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,7 +10,7 @@ - + diff --git a/Engine/Engine.csproj b/Engine/Engine.csproj index 63b9a1b9c..ff6135f06 100644 --- a/Engine/Engine.csproj +++ b/Engine/Engine.csproj @@ -2,7 +2,7 @@ $(ModuleVersion) - net8;net462 + net10.0;net462 Microsoft.Windows.PowerShell.ScriptAnalyzer $(ModuleVersion) Engine @@ -18,11 +18,11 @@ portable - + $(DefineConstants);CORECLR - + @@ -69,10 +69,10 @@ - + - + $(DefineConstants);PSV7;CORECLR diff --git a/Engine/PSScriptAnalyzer.psm1 b/Engine/PSScriptAnalyzer.psm1 index 780c63d7c..345c4d69b 100644 --- a/Engine/PSScriptAnalyzer.psm1 +++ b/Engine/PSScriptAnalyzer.psm1 @@ -9,8 +9,8 @@ $PSModuleRoot = $PSModule.ModuleBase # Import the appropriate nested binary module based on the current PowerShell version $binaryModuleRoot = $PSModuleRoot -# This should be the equivalent of 7.6.x i.e. latest major/minor supported but lowest patch. -[Version] $minimumPowerShellCoreVersion = '7.6.6' +# Keep this aligned with the latest supported PowerShell 7.6 patch. +[Version] $minimumPowerShellCoreVersion = '7.6.9' if ($PSVersionTable.PSVersion.Major -ge 6) { $binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath "PSv$($PSVersionTable.PSVersion.Major)" # Minimum PowerShell Core version given by PowerShell Core support itself and diff --git a/Rules/Rules.csproj b/Rules/Rules.csproj index 7641bb033..cfffc6031 100644 --- a/Rules/Rules.csproj +++ b/Rules/Rules.csproj @@ -2,7 +2,7 @@ $(ModuleVersion) - net8;net462 + net10.0;net462 Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules $(ModuleVersion) Rules @@ -16,7 +16,7 @@ - + @@ -53,7 +53,7 @@ PrepareResources;$(CompileDependsOn) - + $(DefineConstants);PSV7;CORECLR diff --git a/build.psm1 b/build.psm1 index 041b207a9..11dd83f08 100644 --- a/build.psm1 +++ b/build.psm1 @@ -144,7 +144,7 @@ function Start-ScriptAnalyzerBuild $framework = 'net462' if ($PSVersion -eq 7) { - $framework = 'net8' + $framework = 'net10.0' } Push-Location -Path $projectRoot From 15ec0058f77642ea318d103113f481923ab80330 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:16:13 +0000 Subject: [PATCH 8/9] Route SMA restore through nuget.org Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com> --- NuGet.Config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.Config b/NuGet.Config index 28b96b2b6..0e7ba9510 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -10,6 +10,7 @@ + From 97a151ee40602c29cddad1cf40141f776f640d24 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:25:24 +0000 Subject: [PATCH 9/9] Restore PowerShell 7.6.6 minimum Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com> --- Engine/PSScriptAnalyzer.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/PSScriptAnalyzer.psm1 b/Engine/PSScriptAnalyzer.psm1 index 345c4d69b..95f4dbb58 100644 --- a/Engine/PSScriptAnalyzer.psm1 +++ b/Engine/PSScriptAnalyzer.psm1 @@ -9,8 +9,8 @@ $PSModuleRoot = $PSModule.ModuleBase # Import the appropriate nested binary module based on the current PowerShell version $binaryModuleRoot = $PSModuleRoot -# Keep this aligned with the latest supported PowerShell 7.6 patch. -[Version] $minimumPowerShellCoreVersion = '7.6.9' +# Keep this aligned with the oldest supported PowerShell 7.6 patch. +[Version] $minimumPowerShellCoreVersion = '7.6.6' if ($PSVersionTable.PSVersion.Major -ge 6) { $binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath "PSv$($PSVersionTable.PSVersion.Major)" # Minimum PowerShell Core version given by PowerShell Core support itself and