Skip to content

Commit

Permalink
Enable transitive pinning (#34387)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpopMSFT authored Aug 24, 2023
2 parents 78ae34e + 0f0bab7 commit 587b4d9
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 85 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<DefineConstants Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefineConstants);DOT_NET_BUILD_FROM_SOURCE</DefineConstants>

<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
Expand Down
159 changes: 86 additions & 73 deletions Directory.Packages.props

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</NETStandardLibraryNETFrameworkVersion>
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
<StyleCopAnalyzersPackageVersion>1.2.0-beta.435</StyleCopAnalyzersPackageVersion>
<SystemCollectionsImmutableVersion>7.0.0</SystemCollectionsImmutableVersion>
<SystemCollectionsImmutablePackageVersion>7.0.0</SystemCollectionsImmutablePackageVersion>
<SystemDiagnosticsFileVersionInfoVersion>4.0.0</SystemDiagnosticsFileVersionInfoVersion>
<SystemReflectionMetadataVersion>7.0.0</SystemReflectionMetadataVersion>
<MicrosoftDotNetSignToolVersion>8.0.0-beta.23422.1</MicrosoftDotNetSignToolVersion>
Expand Down
3 changes: 2 additions & 1 deletion src/Layout/toolset-tasks/toolset-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<PackageReference Include="Microsoft.Build.Utilities.Core" VersionOverride="15.7.179" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.Versioning" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="1.4.2" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutablePackageVersion)" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Tasks/Microsoft.NET.Sdk.Razor.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="System.Reflection.Metadata" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="System.Text.Json" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutablePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ProjectReference Include="..\Microsoft.DotNet.SdkResolver\Microsoft.DotNet.SdkResolver.csproj" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutablePackageVersion)" />
</ItemGroup>

<Target Name="WriteFullFrameworkResolverManifest" AfterTargets="AfterBuild" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="System.Reflection.Metadata" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="System.Text.Json" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.Css.Parser" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<PackageReference Include="Microsoft.Build.Utilities.Core" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
<PackageReference Include="NuGet.ProjectModel" />
<PackageReference Include="System.Reflection.Metadata" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
<ProjectReference Include="..\..\Microsoft.DotNet.ApiSymbolExtensions\Microsoft.DotNet.ApiSymbolExtensions.csproj" OutputItemType="ReferenceCopyLocalPaths" ReferenceOutputAssembly="false" />
</ItemGroup>


<!-- Packages that are in-box for .NET Core, so we only need to reference them for .NET Framework -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
<!--
Expand All @@ -69,8 +68,9 @@
the same System.Reflection.Metadata assembly and their types can unify. See the following link for the MSBuild binding redirect config.
https://github.com/dotnet/msbuild/blob/5d102ae37163fc1f22610bb433c3ab9a2fff91f0/src/MSBuild/app.config#L59
-->
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Reflection.Metadata" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutablePackageVersion)" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" VersionOverride="$(SystemReflectionMetadataVersion)" />
</ItemGroup>

<!-- These are loaded from the CLI's copy on .NET Core, we don't need to duplicate them on disk -->
Expand Down
3 changes: 2 additions & 1 deletion src/Tests/HelixTasks/HelixTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<PackageReference Include="Microsoft.Build" VersionOverride="15.7.179" />
<PackageReference Include="Microsoft.Build.Utilities.Core" VersionOverride="15.7.179" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="1.7.0" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutablePackageVersion)" />
<PackageReference Include="NuGet.ProjectModel" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@

<!-- Packages that are in-box for .NET Core, so we only need to reference them for .NET Framework -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Reflection.Metadata" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" VersionOverride="$(SystemReflectionMetadataVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 587b4d9

Please sign in to comment.