Skip to content

Commit fee72b4

Browse files
authored
[Infra] merge Common.Benchmark.props and Common.Tests.props into Directory.Build.props (#109)
1 parent 1b54c83 commit fee72b4

File tree

3 files changed

+33
-39
lines changed

3 files changed

+33
-39
lines changed

Build/Common.Benchmark.props

Lines changed: 0 additions & 18 deletions
This file was deleted.

Build/Common.Tests.props

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/Directory.Build.props

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,37 @@
33
<RootDir>$(MSBuildThisFileDirectory)..</RootDir>
44
</PropertyGroup>
55
<Import Project="$(RootDir)\Build\Common.props"/>
6-
<Import Condition="$(MSBuildProjectName.EndsWith('Tests'))" Project="$(RootDir)\Build\Common.Tests.props"/>
7-
<Import Condition="$(MSBuildProjectName.EndsWith('Benchmark'))" Project="$(RootDir)\Build\Common.Benchmark.props"/>
6+
7+
<!-- common tests properties -->
8+
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
9+
<IsPackable>False</IsPackable>
10+
<DefaultTargetFrameworks>net50;net48</DefaultTargetFrameworks>
11+
</PropertyGroup>
12+
13+
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
14+
<PackageReference Include="FluentAssertions" Version="5.10.3" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
16+
<PackageReference Include="xunit" Version="2.4.1" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
18+
<PrivateAssets>all</PrivateAssets>
19+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
20+
</PackageReference>
21+
</ItemGroup>
22+
23+
<Import Project="$(RootDir)\Build\DeleteGenerateBindingRedirects.target" Condition="$(MSBuildProjectName.EndsWith('Tests'))"/>
24+
25+
<!-- common benchmark properties -->
26+
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Benchmark'))">
27+
<IsPackable>False</IsPackable>
28+
<OutputType>Exe</OutputType>
29+
<DefaultTargetFrameworks>net50;net48</DefaultTargetFrameworks>
30+
</PropertyGroup>
31+
32+
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Benchmark'))">
33+
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
34+
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" />
35+
</ItemGroup>
36+
37+
<Import Project="$(RootDir)\Build\DeleteGenerateBindingRedirects.target" Condition="$(MSBuildProjectName.EndsWith('Benchmark'))"/>
38+
839
</Project>

0 commit comments

Comments
 (0)