Skip to content

Commit

Permalink
improve CompileBefore for F# and Compile condition for C# and VB for …
Browse files Browse the repository at this point in the history
…msbuild targets
  • Loading branch information
arturcic committed Sep 29, 2023
1 parent 03a9d8f commit 505aa28
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,9 @@
<Output TaskParameter="GitVersionInformationFilePath" PropertyName="GitVersionInformationFilePath" />
</GenerateGitVersionInformation>
<!-- <Message Importance="High" Text="Info: $(GitVersionInformationFilePath)" /> -->

<ItemGroup Condition="'$(Language)' == 'F#'">
<CompileBefore Include="$(GitVersionInformationFilePath)" />
</ItemGroup>
<ItemGroup Condition="'$(Language)' != 'F#'">
<Compile Include="$(GitVersionInformationFilePath)" />
</ItemGroup>
<ItemGroup>
<CompileBefore Include="$(GitVersionInformationFilePath)" Condition=" '$(Language)' == 'F#' " />
<Compile Include="$(GitVersionInformationFilePath)" Condition=" '$(Language)' == 'C#' Or '$(Language)' == 'VB' " />
<FileWrites Include="$(GitVersionInformationFilePath)" />
<_GeneratedCodeFiles Include="$(GitVersionInformationFilePath)" />
</ItemGroup>
Expand All @@ -133,13 +128,9 @@
<Output TaskParameter="AssemblyInfoTempFilePath" PropertyName="AssemblyInfoTempFilePath" />
</UpdateAssemblyInfo>
<!-- <Message Importance="High" Text="Assembly: $(AssemblyInfoTempFilePath)" /> -->
<ItemGroup Condition="'$(Language)' == 'F#'">
<CompileBefore Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>
<ItemGroup Condition="'$(Language)' != 'F#'">
<Compile Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>
<ItemGroup>
<CompileBefore Include="$(AssemblyInfoTempFilePath)" Condition=" '$(Language)' == 'F#' " />
<Compile Include="$(AssemblyInfoTempFilePath)" Condition=" '$(Language)' == 'C#' Or '$(Language)' == 'VB' " />
<FileWrites Include="$(AssemblyInfoTempFilePath)" />
<_GeneratedCodeFiles Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>
Expand Down

0 comments on commit 505aa28

Please sign in to comment.