Fix reading of minimum MSBuild version

This commit is contained in:
Chet Husk 2024-03-22 13:22:46 -05:00 committed by github-actions
parent 79c1c4cc9a
commit ee91cb14ff

View file

@ -1207,11 +1207,13 @@ Copyright (c) .NET Foundation. All rights reserved.
<Target Name="GenerateBundledMSBuildProps" DependsOnTargets="SetupBundledComponents">
<PropertyGroup>
<MinimumMSBuildVersionFile>$(RedistLayoutPath)sdk/$(Version)/minimumMSBuildVersion</MinimumMSBuildVersionFile>
<BundledMSBuildPropsFileName>Microsoft.NETCoreSdk.BundledMSBuildInformation.props</BundledMSBuildPropsFileName>
<MinimumMSBuildVersionFile Condition="$([System.Text.RegularExpressions.Regex]::Match(%(SDKInternalFiles.Identity),'.*minimumMSBuildVersion').Success) ">%(SDKInternalFiles.Identity)</MinimumMSBuildVersionFile>
<BundledMSBuildVersion>$(MSBuildVersion)</BundledMSBuildVersion>
</PropertyGroup>
<Error Text="No MSBuild version file found under '$(RedistLayoutPath)sdk/$(Version)'" Condition="!Exists('$(MinimumMSBuildVersionFile)')" />
<ReadLinesFromFile File="$(MinimumMSBuildVersionFile)">
<Output TaskParameter="Lines" PropertyName="MinimumMSBuildVersion"/>
</ReadLinesFromFile>