Files
TTT/Directory.Build.props
MSWS 2eeb1a2e93 build: Refactor GitVersion target and clean up build properties
- Refactor `Directory.Build.props`:
  - Add blank line between `<ItemGroup>` elements for clarity.
  - Remove redundant condition from `GitVersion.MsBuild` package reference.
  - Update `GenerateGitVersionInformation` target to execute `BeforeCompile` instead of `BeforeBuild`.
  - Replace `<PropertyGroup>` elements with explicit `<Exec>` commands in the `GenerateGitVersionInformation` target.
  - Modify `<Exec>` command syntax for consistency with other entries.
2025-07-29 17:40:51 -07:00

23 lines
920 B
XML

<Project>
<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.328" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<PackageReference Include="GitVersion.MsBuild" Version="6.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
<Compile Include="../GitVersionInformation.g.cs" />
</ItemGroup>
<Target Name="GenerateGitVersionInformation" BeforeTargets="BeforeCompile" Condition="'$(OS)' != 'Windows_NT'">
<Exec Command="dotnet-gitversion '$(ProjectDir)' &gt; '$(ProjectDir)/gitversion.json'" />
<Exec Command="dotnet run --project 'Versioning/GenerateGitVersion.csproj'" />
</Target>
</Project>