Skip to content

Commit 772997f

Browse files
authored
Upgrade to use .NET 6 (#1873)
1 parent 40be593 commit 772997f

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Engine/Engine.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

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

@@ -63,10 +63,10 @@
6363
</EmbeddedResource>
6464
</ItemGroup>
6565

66-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
66+
<ItemGroup Condition="'$(TargetFramework)' == 'net6'">
6767
<PackageReference Include="System.Management.Automation" Version="7.0.11" />
6868
</ItemGroup>
69-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
69+
<PropertyGroup Condition="'$(TargetFramework)' == 'net6'">
7070
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
7171
</PropertyGroup>
7272

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ To install **PSScriptAnalyzer** from source code:
7272

7373
### Requirements
7474

75-
- [.NET Core 3.1.424 SDK](https://www.microsoft.com/net/download/dotnet-core/3.1#sdk-3.1.424) or
75+
- [.NET 6.0.11 containing 6.0.403 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) or
7676
newer patch release
7777
* 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.
7878
* Optionally but recommended for development: [Visual Studio 2017/2019](https://www.visualstudio.com/downloads)

Rules/Rules.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

1717
</ItemGroup>
1818

19-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
19+
<ItemGroup Condition=" '$(TargetFramework)' == 'net6' ">
2020
<!-- The version of Newtonsoft.Json needs to be newer than the version in the oldest supported version of PowerShell 7: https://github.com/PowerShell/PowerShell/blob/v7.0.11/src/System.Management.Automation/System.Management.Automation.csproj#L15 -->
2121
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
2222
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
@@ -57,7 +57,7 @@
5757
<DefineConstants>$(DefineConstants);PSV3;PSV4</DefineConstants>
5858
</PropertyGroup>
5959

60-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
60+
<PropertyGroup Condition="'$(TargetFramework)' == 'net6'">
6161
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
6262
</PropertyGroup>
6363

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ build_script:
3636
if ($env:PowerShellEdition -eq 'PowerShellCore') {
3737
Set-Location $env:APPVEYOR_BUILD_FOLDER
3838
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 7
39-
./PSCompatibilityCollector/build.ps1 -Configuration "$env:BuildConfiguration" -Framework 'netcoreapp3.1'
39+
./PSCompatibilityCollector/build.ps1 -Configuration "$env:BuildConfiguration" -Framework 'net6'
4040
}
4141
4242
test_script:

build.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function Start-ScriptAnalyzerBuild
203203

204204
$framework = 'net462'
205205
if ($PSVersion -eq 7) {
206-
$framework = 'netcoreapp3.1'
206+
$framework = 'net6'
207207
}
208208

209209
# build the appropriate assembly

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.1.424"
3+
"version": "6.0.403"
44
}
55
}

0 commit comments

Comments
 (0)