From 99632f24c7722376b2f6047f1ee9e0902478979b Mon Sep 17 00:00:00 2001
From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com>
Date: Mon, 3 Mar 2025 16:09:31 -0800
Subject: [PATCH] Upgrade to .NET 8 since .NET 6 is past EOL
---
.pipelines/PSScriptAnalyzer-Official.yml | 5 +----
Engine/Engine.csproj | 10 +++++-----
Rules/Rules.csproj | 6 +++---
build.psm1 | 2 +-
global.json | 3 ++-
5 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/.pipelines/PSScriptAnalyzer-Official.yml b/.pipelines/PSScriptAnalyzer-Official.yml
index 971cdc351..b3f2c2cb4 100644
--- a/.pipelines/PSScriptAnalyzer-Official.yml
+++ b/.pipelines/PSScriptAnalyzer-Official.yml
@@ -80,10 +80,7 @@ extends:
inputs:
packageType: sdk
useGlobalJson: true
- - pwsh: |
- Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
- Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
- ./tools/installPSResources.ps1 -PSRepository CFS
+ - pwsh: ./tools/installPSResources.ps1 -PSRepository CFS
displayName: Install PSResources
- pwsh: ./build.ps1 -Configuration Release -All
displayName: Build
diff --git a/Engine/Engine.csproj b/Engine/Engine.csproj
index 3025c9a08..e96f5c9d9 100644
--- a/Engine/Engine.csproj
+++ b/Engine/Engine.csproj
@@ -2,7 +2,7 @@
$(ModuleVersion)
- net6;net462
+ net8;net462
Microsoft.Windows.PowerShell.ScriptAnalyzer
$(ModuleVersion)
Engine
@@ -18,11 +18,11 @@
portable
-
+
$(DefineConstants);CORECLR
-
+
@@ -69,10 +69,10 @@
-
+
-
+
$(DefineConstants);PSV7;CORECLR
diff --git a/Rules/Rules.csproj b/Rules/Rules.csproj
index 8fef9e969..6e485c4e9 100644
--- a/Rules/Rules.csproj
+++ b/Rules/Rules.csproj
@@ -2,7 +2,7 @@
$(ModuleVersion)
- net6;net462
+ net8;net462
Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
$(ModuleVersion)
Rules
@@ -16,7 +16,7 @@
-
+
@@ -61,7 +61,7 @@
$(DefineConstants);PSV3;PSV4
-
+
$(DefineConstants);PSV7;CORECLR
diff --git a/build.psm1 b/build.psm1
index 3dc9c0ec0..c83fa2664 100644
--- a/build.psm1
+++ b/build.psm1
@@ -144,7 +144,7 @@ function Start-ScriptAnalyzerBuild
$framework = 'net462'
if ($PSVersion -eq 7) {
- $framework = 'net6'
+ $framework = 'net8'
}
# build the appropriate assembly
diff --git a/global.json b/global.json
index 6e6e5445c..37239305b 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,6 @@
{
"sdk": {
- "version": "6.0.427"
+ "version": "8.0.406",
+ "rollForward": "latestFeature"
}
}