Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #454 from dotnet/dev/jmarolf/central-package-mange…
Browse files Browse the repository at this point in the history
…ment

use central package management
  • Loading branch information
jmarolf authored Oct 3, 2022
2 parents 3fa980a + 51e29cb commit 7c7e770
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 25 deletions.
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,13 @@
<DiscoverEditorConfigFiles>true</DiscoverEditorConfigFiles>
</PropertyGroup>

<!-- Nuget settings -->
<PropertyGroup>
<!-- Use Directory.Packages.props for nuget package versions -->
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<!-- Enable faster restore times -->
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
</PropertyGroup>

</Project>
18 changes: 18 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>

<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="1.3.0" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.4.1" />
<PackageVersion Include="Microsoft.Build" Version="16.7" />
<PackageVersion Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.21" />
<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.16.30" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="Moq" Version="4.14.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="NuGet.Versioning" Version="5.8.0-preview.3.6823" />
<PackageVersion Include="System.Collections.Immutable" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta1.20371.2" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0-rc.1.20451.14" />
</ItemGroup>
</Project>
16 changes: 8 additions & 8 deletions src/MSBuild.Abstractions/MSBuild.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" Version="$(MicrosoftBuildLocatorVersion)" />
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageReference Include="Microsoft.Build.Locator" />
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Win32.Registry" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="System.Security.Principal.Windows" />

<!-- These packages are only available on .NET Framework, but are solely there to call into a COM service and work fine on .NET Core -->
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.16.30" PrivateAssets="all">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all">
<NoWarn>NU1701</NoWarn>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.21" PrivateAssets="all">
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" PrivateAssets="all">
<NoWarn>NU1701</NoWarn>
</PackageReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Include="System.Collections.Immutable" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageReference Include="Microsoft.Win32.Registry" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="System.Security.Principal.Windows" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/MSBuild.Conversion.SDK/MSBuild.Conversion.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" Version="$(MicrosoftBuildLocatorVersion)" />
<PackageReference Include="NuGet.Versioning" Version="$(NuGetVersioningVersion)" />
<PackageReference Include="Microsoft.Build.Locator" />
<PackageReference Include="NuGet.Versioning" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions src/try-convert/try-convert.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
<PackageReference Include="Microsoft.Build.Locator" Version="$(MicrosoftBuildLocatorVersion)" />
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageReference Include="System.CommandLine" />
<PackageReference Include="Microsoft.Build.Locator" />
<PackageReference Include="Microsoft.Win32.Registry" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="System.Security.Principal.Windows" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions tests/end-to-end/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@
<DiscoverEditorConfigFiles>true</DiscoverEditorConfigFiles>
</PropertyGroup>

<!-- Nuget settings -->
<PropertyGroup>
<!-- Use Directory.Packages.props for nuget package versions -->
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<!-- Enable faster restore times -->
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
</PropertyGroup>

</Project>
18 changes: 18 additions & 0 deletions tests/end-to-end/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>

<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="1.3.0" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.4.1" />
<PackageVersion Include="Microsoft.Build" Version="16.7" />
<PackageVersion Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.21" />
<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.16.30" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="Moq" Version="4.14.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="NuGet.Versioning" Version="5.8.0-preview.3.6823" />
<PackageVersion Include="System.Collections.Immutable" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta1.20371.2" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0-rc.1.20451.14" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions tests/unit/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@
<DiscoverEditorConfigFiles>true</DiscoverEditorConfigFiles>
</PropertyGroup>

<!-- Nuget settings -->
<PropertyGroup>
<!-- Use Directory.Packages.props for nuget package versions -->
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<!-- Enable faster restore times -->
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
</PropertyGroup>

</Project>
18 changes: 18 additions & 0 deletions tests/unit/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>

<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="1.3.0" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.4.1" />
<PackageVersion Include="Microsoft.Build" Version="16.7" />
<PackageVersion Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.21" />
<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.16.30" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="Moq" Version="4.14.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="NuGet.Versioning" Version="5.8.0-preview.3.6823" />
<PackageVersion Include="System.Collections.Immutable" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta1.20371.2" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="5.0.0-rc.1.20451.14" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0-rc.1.20451.14" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)" />
<PackageReference Include="coverlet.collector" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" />
<PackageReference Include="Moq" />
<PackageReference Include="System.Collections.Immutable" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 7c7e770

Please sign in to comment.