Skip to content

Commit

Permalink
Fixed DotNetVersion parse order (#6180) (#6190)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmccord authored May 23, 2023
1 parent 9a30110 commit 3a7d457
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@
</ItemGroup>
</Target>

<Target Name="_ParseVersion">
<Exec Command="dotnet --version" StandardOutputImportance="Low" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="DotNetVersion" />
</Exec>
</Target>

<Target
Name="_GenerateGraphQLCode"
Inputs="@(GenerateGraphQLCodeItems)"
Outputs="$(MSBuildProjectDirectory)\$(IntermediateOutputPath)berry\.build.info"
DependsOnTargets="_ParseVersion"
Condition="'@(GraphQL)' != ''">

<Exec Command="dotnet --version" StandardOutputImportance="Low" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="DotNetVersion" />
</Exec>

<PropertyGroup>
<DotNetMajor Condition="$([MSBuild]::VersionGreaterThanOrEquals($(DotNetVersion), 6))">6</DotNetMajor>
<DotNetMajor Condition="$([MSBuild]::VersionGreaterThanOrEquals($(DotNetVersion), 7))">7</DotNetMajor>
Expand Down

0 comments on commit 3a7d457

Please sign in to comment.