Skip to content

Commit

Permalink
Manage packages centrally
Browse files Browse the repository at this point in the history
Like what the internal bot was doing elsewhere, but manually.
  • Loading branch information
andyleejordan committed Sep 26, 2024
1 parent b389f6c commit 6ea97af
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 20 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
17 changes: 17 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<ItemGroup>
<!-- Newtonsoft.Json brings in an old version of CSharp. So, we are forcing a newer version. -->
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageVersion Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageVersion Include="Microsoft.PowerShell.4.ReferenceAssemblies" Version="1.0.0" />
<PackageVersion Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.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.2.17/src/System.Management.Automation/System.Management.Automation.csproj#L15 -->
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Pluralize.NET" Version="1.0.2" />
<PackageVersion Include="PowerShellStandard.Library" Version="3.0.0-preview-02" />
<PackageVersion Include="System.Management.Automation" Version="7.0.13" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions Engine/Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.CSharp" />
</ItemGroup>

<!--
Expand All @@ -70,22 +70,22 @@


<ItemGroup Condition="'$(TargetFramework)' == 'net6'">
<PackageReference Include="System.Management.Automation" Version="7.0.13" />
<PackageReference Include="System.Management.Automation" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net6'">
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' AND '$(Configuration)' == 'PSV3Release' AND '$(Configuration)' != 'PSV4Release'">
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' AND '$(Configuration)' == 'PSV4Release'">
<PackageReference Include="Microsoft.PowerShell.4.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.PowerShell.4.ReferenceAssemblies" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' AND '$(Configuration)' != 'PSV3Release'">
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'PSV3Release' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@
</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.2.17/src/System.Management.Automation/System.Management.Automation.csproj#L15 -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="PowerShellStandard.Library" Version="3.0.0-preview-02" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Microsoft.Win32.Registry" />
<PackageReference Include="Microsoft.Management.Infrastructure" />
<PackageReference Include="PowerShellStandard.Library" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" />
<PackageReference Include="Microsoft.Management.Infrastructure" VersionOverride="1.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
11 changes: 5 additions & 6 deletions Rules/Rules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6' ">
<!-- 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.2.17/src/System.Management.Automation/System.Management.Automation.csproj#L15 -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="Pluralize.NET" Version="1.0.2" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Reflection.TypeExtensions" />
<PackageReference Include="Microsoft.Management.Infrastructure" />
<PackageReference Include="Pluralize.NET" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data.Entity.Design" />
</ItemGroup>
Expand Down

0 comments on commit 6ea97af

Please sign in to comment.