Skip to content

Commit

Permalink
Don't use hardcoded package versions (#7809)
Browse files Browse the repository at this point in the history
Context
Fixes # #7794

Changes Made
Move package versions to eng/Versions.props instead of being located directly in the PackageReferences in eng/Packages.props. This allows source-build to override some PackageReferences at build time if we need to.

Testing
I tested this using ./build.sh, ./build.sh with the repo source-build configuration, and in a source-build tarball, all built fine.

Notes
I attached the prebuilt report resulting from a source-build with changes from this PR and #7798

msbuild-7-11-22.txt
  • Loading branch information
lbussell authored Jul 15, 2022
1 parent 7b6fa98 commit 37c7e19
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
20 changes: 10 additions & 10 deletions eng/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
<ItemGroup>
<PackageReference Update="Microsoft.Build.NuGetSdkResolver" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.Build.Tasks" Version="$(MicrosoftNetCompilersToolsetVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.Collections" Version="4.2.0-1.22102.8" />
<PackageReference Update="Microsoft.CodeAnalysis.Collections" Version="$(MicrosoftCodeAnalysisCollectionsVersion)" />
<PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />
<PackageReference Update="Microsoft.IO.Redist" Version="$(MicrosoftIORedistVersion)" />
<PackageReference Update="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilersToolsetVersion)" />
<PackageReference Update="NuGet.Build.Tasks" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="NuGet.Frameworks" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="System.Collections.Immutable" Version="6.0.0" />
<PackageReference Update="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageReference Update="System.Net.Http" Version="4.3.4" />
<PackageReference Update="System.Memory" Version="4.5.5" />
<PackageReference Update="System.Reflection.Metadata" Version="6.0.0" />
<PackageReference Update="System.Reflection.MetadataLoadContext" Version="6.0.0" />
<PackageReference Update="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Update="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Update="System.Net.Http" Version="$(SystemNetHttpVersion)" />
<PackageReference Update="System.Memory" Version="$(SystemMemoryVersion)" />
<PackageReference Update="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
<PackageReference Update="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />
<PackageReference Update="System.Resources.Extensions" Version="$(SystemResourcesExtensionsPackageVersion)" />
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
<PackageReference Update="System.Security.Permissions" Version="6.0.0" />
<PackageReference Update="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Update="System.Text.Encoding.CodePages" Version="6.0.0" />
<PackageReference Update="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
<PackageReference Update="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageReference Update="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesVersion)" />
<PackageReference Update="System.Text.Json" Version="$(SystemTextJsonVersion)" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Version="$(SystemThreadingTasksDataflowVersion)" />
<PackageReference Update="xunit.assert" Version="$(XUnitVersion)" />
Expand Down
10 changes: 10 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@
</PropertyGroup>
<!-- Production Dependencies -->
<PropertyGroup>
<SystemCollectionsImmutableVersion>6.0.0</SystemCollectionsImmutableVersion>
<SystemConfigurationConfigurationManagerVersion>6.0.0</SystemConfigurationConfigurationManagerVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemNetHttpVersion>4.3.4</SystemNetHttpVersion>
<SystemReflectionMetadataLoadContextVersion>6.0.0</SystemReflectionMetadataLoadContextVersion>
<SystemReflectionMetadataVersion>6.0.0</SystemReflectionMetadataVersion>
<SystemResourcesExtensionsPackageVersion>6.0.0</SystemResourcesExtensionsPackageVersion>
<SystemSecurityPermissionsVersion>6.0.0</SystemSecurityPermissionsVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
<SystemTextEncodingCodePagesVersion>6.0.0</SystemTextEncodingCodePagesVersion>
</PropertyGroup>
<!-- Toolset Dependencies -->
<PropertyGroup>
<!-- DotNetCliVersion MUST match the dotnet version in global.json.
Otherwise, this version of dotnet will not be installed and the build will error out. -->
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1))</DotNetCliVersion>
<MicrosoftCodeAnalysisCollectionsVersion>4.2.0-1.22102.8</MicrosoftCodeAnalysisCollectionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22362.2</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.2.21154.6</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftIORedistVersion>6.0.0</MicrosoftIORedistVersion>
Expand Down

0 comments on commit 37c7e19

Please sign in to comment.