From 201705780c9eb8240faccbca906e3e9a18fc6cb8 Mon Sep 17 00:00:00 2001
From: Christoph Bergmeister <c.bergmeister@gmail.com>
Date: Mon, 25 Jul 2022 14:00:55 +0100
Subject: [PATCH 1/3] Update Microsoft.PowerShell.CrossCompatibility.csproj

---
 .../Microsoft.PowerShell.CrossCompatibility.csproj            | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PSCompatibilityCollector/Microsoft.PowerShell.CrossCompatibility/Microsoft.PowerShell.CrossCompatibility.csproj b/PSCompatibilityCollector/Microsoft.PowerShell.CrossCompatibility/Microsoft.PowerShell.CrossCompatibility.csproj
index 0fb5d2366..eaa88be73 100644
--- a/PSCompatibilityCollector/Microsoft.PowerShell.CrossCompatibility/Microsoft.PowerShell.CrossCompatibility.csproj
+++ b/PSCompatibilityCollector/Microsoft.PowerShell.CrossCompatibility/Microsoft.PowerShell.CrossCompatibility.csproj
@@ -11,19 +11,21 @@
   </PropertyGroup>
 
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <!--  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 -->
+    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
     <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
     <PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
     <PackageReference Include="PowerShellStandard.Library" Version="3.0.0-preview-02" />
   </ItemGroup>
 
   <ItemGroup Condition="'$(TargetFramework)' == 'net462'">
+    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
     <PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
     <PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
   </ItemGroup>
 
   <ItemGroup>
     <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
-    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
   </ItemGroup>
 
 </Project>

From 8171800ffd08561d3904d9b7ab6181639b1cca89 Mon Sep 17 00:00:00 2001
From: Christoph Bergmeister <c.bergmeister@gmail.com>
Date: Mon, 25 Jul 2022 14:02:04 +0100
Subject: [PATCH 2/3] Update Rules.csproj

---
 Rules/Rules.csproj | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Rules/Rules.csproj b/Rules/Rules.csproj
index d94159b8a..038d4b149 100644
--- a/Rules/Rules.csproj
+++ b/Rules/Rules.csproj
@@ -13,16 +13,19 @@
   <ItemGroup>
     <ProjectReference Include="..\Engine\Engine.csproj" />
     <ProjectReference Include="..\PSCompatibilityCollector\Microsoft.PowerShell.CrossCompatibility\Microsoft.PowerShell.CrossCompatibility.csproj" />
-    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
+
   </ItemGroup>
 
   <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
+    <!--  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 -->
+    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
     <PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
     <PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
     <PackageReference Include="Pluralize.NET" Version="1.0.2" />
   </ItemGroup>
 
   <ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
+    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
     <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.Data.Entity.Design" />
   </ItemGroup>

From 063adec0683ebe4eb0427bcd981ecc26a4d65761 Mon Sep 17 00:00:00 2001
From: Christoph Bergmeister <c.bergmeister@gmail.com>
Date: Mon, 25 Jul 2022 14:02:37 +0100
Subject: [PATCH 3/3] Update dependabot.yml

---
 .github/dependabot.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 3b819b047..cd548b070 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -13,5 +13,4 @@ updates:
     - "bergmeister"
   ignore:
     - dependency-name: "System.Management.Automation"
-    - dependency-name: "Newtonsoft.Json"
     - dependency-name: "PowerShellStandard.Library"