Skip to content

Commit 45a82a1

Browse files
Upgrade to .NET 8 since .NET 6 is past EOL (#2073)
1 parent bcec9f6 commit 45a82a1

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

.pipelines/PSScriptAnalyzer-Official.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ extends:
8080
inputs:
8181
packageType: sdk
8282
useGlobalJson: true
83-
- pwsh: |
84-
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
85-
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
86-
./tools/installPSResources.ps1 -PSRepository CFS
83+
- pwsh: ./tools/installPSResources.ps1 -PSRepository CFS
8784
displayName: Install PSResources
8885
- pwsh: ./build.ps1 -Configuration Release -All
8986
displayName: Build

Engine/Engine.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<VersionPrefix>$(ModuleVersion)</VersionPrefix>
5-
<TargetFrameworks>net6;net462</TargetFrameworks>
5+
<TargetFrameworks>net8;net462</TargetFrameworks>
66
<AssemblyName>Microsoft.Windows.PowerShell.ScriptAnalyzer</AssemblyName>
77
<AssemblyVersion>$(ModuleVersion)</AssemblyVersion>
88
<PackageId>Engine</PackageId>
@@ -18,11 +18,11 @@
1818
<DebugType>portable</DebugType>
1919
</PropertyGroup>
2020

21-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6' ">
21+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8' ">
2222
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
2323
</PropertyGroup>
2424

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6' ">
25+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8' ">
2626
<Compile Remove="SafeDirectoryCatalog.cs" />
2727
</ItemGroup>
2828

@@ -69,10 +69,10 @@
6969
</PropertyGroup>
7070

7171

72-
<ItemGroup Condition="'$(TargetFramework)' == 'net6'">
72+
<ItemGroup Condition="'$(TargetFramework)' == 'net8'">
7373
<PackageReference Include="System.Management.Automation" />
7474
</ItemGroup>
75-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6'">
75+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8'">
7676
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
7777
</PropertyGroup>
7878

Rules/Rules.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<VersionPrefix>$(ModuleVersion)</VersionPrefix>
5-
<TargetFrameworks>net6;net462</TargetFrameworks>
5+
<TargetFrameworks>net8;net462</TargetFrameworks>
66
<AssemblyName>Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules</AssemblyName>
77
<AssemblyVersion>$(ModuleVersion)</AssemblyVersion>
88
<PackageId>Rules</PackageId>
@@ -16,7 +16,7 @@
1616

1717
</ItemGroup>
1818

19-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6' ">
19+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8' ">
2020
<PackageReference Include="Newtonsoft.Json" />
2121
<PackageReference Include="System.Reflection.TypeExtensions" />
2222
<PackageReference Include="Microsoft.Management.Infrastructure" />
@@ -61,7 +61,7 @@
6161
<DefineConstants>$(DefineConstants);PSV3;PSV4</DefineConstants>
6262
</PropertyGroup>
6363

64-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6'">
64+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8'">
6565
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
6666
</PropertyGroup>
6767

build.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function Start-ScriptAnalyzerBuild
144144

145145
$framework = 'net462'
146146
if ($PSVersion -eq 7) {
147-
$framework = 'net6'
147+
$framework = 'net8'
148148
}
149149

150150
# build the appropriate assembly

global.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.427"
3+
"version": "8.0.406",
4+
"rollForward": "latestFeature"
45
}
56
}

0 commit comments

Comments
 (0)