Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Newtonsoft json to 12.0.1 due to PowerShell 6.1 going out of support #1336

Merged
merged 3 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Engine/PSScriptAnalyzer.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ $binaryModuleRoot = $PSModuleRoot

if (($PSVersionTable.Keys -contains "PSEdition") -and ($PSVersionTable.PSEdition -ne 'Desktop')) {
$binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath 'coreclr'
if ($PSVersionTable.PSVersion -lt [Version]'6.1.0') {
throw "Minimum supported version of PSScriptAnalyzer for PowerShell Core is 6.1.0 but current version is '$($PSVersionTable.PSVersion)'. Please update PowerShell Core."
# Minimum PowerShell Core version given by PowerShell Core support itself and
# also the version of NewtonSoft.Json implicitly that PSSA ships with,
# which cannot be higher than the one that PowerShell ships with.
[Version] $minimumPowerShellCoreVersion = '6.2.0'
if ($PSVersionTable.PSVersion -lt $minimumPowerShellCoreVersion) {
throw "Minimum supported version of PSScriptAnalyzer for PowerShell Core is $minimumPowerShellCoreVersion but current version is '$($PSVersionTable.PSVersion)'. Please update PowerShell Core."
}
}
elseif ($PSVersionTable.PSVersion.Major -eq 5) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
Expand All @@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Rules/Rules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<ProjectReference Include="..\Engine\Engine.csproj" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ environment:
BuildConfiguration: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # For faster CI builds
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PowerShellEdition: PowerShellCore
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PowerShellEdition: WindowsPowerShell
Expand Down