Skip to content

Commit

Permalink
Extract SDK version from global.json in Versions.props (#6596)
Browse files Browse the repository at this point in the history
Instead of syncing the version in two places,
treat global.json as canonical and extract the SDK
version value from it in the build.
  • Loading branch information
rainersigwald committed Jun 21, 2021
1 parent 2c37803 commit 2013004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<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>6.0.100-preview.3.21202.5</DotNetCliVersion>
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1))</DotNetCliVersion>
<MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.2.21154.6</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftNetCompilersToolsetVersion>4.0.0-2.21313.1</MicrosoftNetCompilersToolsetVersion>
<NuGetBuildTasksVersion>6.0.0-preview.1.107</NuGetBuildTasksVersion>
Expand Down

0 comments on commit 2013004

Please sign in to comment.