Skip to content

Commit a876491

Browse files
authored
Merge pull request #269 from DataObjects-NET/master-build-constants-movement
Moves build constants declaration to Directory.Build.props
2 parents 780ddaa + 8185816 commit a876491

File tree

6 files changed

+8
-84
lines changed

6 files changed

+8
-84
lines changed

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@
6161
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net6.0;net5.0</TargetFrameworks> <!-- fallback to default -->
6262
</PropertyGroup>
6363

64+
<PropertyGroup Condition = "$(Configuration.Contains('Debug')) == 'true'">
65+
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
66+
</PropertyGroup>
67+
68+
<PropertyGroup Condition = "$(Configuration.Contains('Release')) == 'true'">
69+
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
70+
</PropertyGroup>
71+
6472
<PropertyGroup>
6573
<NoLogo>true</NoLogo>
6674
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>

Orm/Xtensive.Orm.Manual/Xtensive.Orm.Manual.csproj

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,6 @@
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1313
<WarningLevel>2</WarningLevel>
1414
</PropertyGroup>
15-
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
16-
<DefineConstants>TRACE;DEBUG</DefineConstants>
17-
</PropertyGroup>
18-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET6'">
19-
<DefineConstants>TRACE;DEBUG</DefineConstants>
20-
</PropertyGroup>
21-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET5'">
22-
<DefineConstants>TRACE;DEBUG</DefineConstants>
23-
</PropertyGroup>
24-
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
25-
<DefineConstants>TRACE</DefineConstants>
26-
</PropertyGroup>
27-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET5'">
28-
<DefineConstants>TRACE</DefineConstants>
29-
</PropertyGroup>
30-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET6'">
31-
<DefineConstants>TRACE</DefineConstants>
32-
</PropertyGroup>
3315
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
3416
<ItemGroup>
3517
<ProjectReference Include="..\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />

Orm/Xtensive.Orm.PostgreSql/Xtensive.Orm.PostgreSql.csproj

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,6 @@
1515
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1616
<WarningLevel>2</WarningLevel>
1717
</PropertyGroup>
18-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
19-
<DefineConstants>TRACE;DEBUG</DefineConstants>
20-
</PropertyGroup>
21-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET6'" Label="Debug">
22-
<DefineConstants>TRACE;DEBUG</DefineConstants>
23-
</PropertyGroup>
24-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET5'" Label="Debug">
25-
<DefineConstants>TRACE;DEBUG</DefineConstants>
26-
</PropertyGroup>
27-
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
28-
<DefineConstants>TRACE</DefineConstants>
29-
</PropertyGroup>
30-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET5'" Label="Release">
31-
<DefineConstants>TRACE</DefineConstants>
32-
</PropertyGroup>
33-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET6'" Label="Release">
34-
<DefineConstants>TRACE</DefineConstants>
35-
</PropertyGroup>
3618
<ItemGroup>
3719
<PackageReference Include="Npgsql" Version="4.1.3.1" />
3820
</ItemGroup>

Orm/Xtensive.Orm.Tests.Core/Xtensive.Orm.Tests.Core.csproj

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1212
<WarningLevel>2</WarningLevel>
1313
</PropertyGroup>
14-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
15-
<DefineConstants>TRACE;DEBUG</DefineConstants>
16-
</PropertyGroup>
17-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET6'" Label="Debug">
18-
<DefineConstants>TRACE;DEBUG</DefineConstants>
19-
</PropertyGroup>
20-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET5'" Label="Debug">
21-
<DefineConstants>TRACE;DEBUG</DefineConstants>
22-
</PropertyGroup>
23-
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
24-
<DefineConstants>TRACE</DefineConstants>
25-
</PropertyGroup>
26-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET5'" Label="Release">
27-
<DefineConstants>TRACE</DefineConstants>
28-
</PropertyGroup>
29-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET6'" Label="Release">
30-
<DefineConstants>TRACE</DefineConstants>
31-
</PropertyGroup>
3214
<ItemGroup>
3315
<ProjectReference Include="..\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />
3416
<ProjectReference Include="..\Xtensive.Orm\Xtensive.Orm.csproj" />

Orm/Xtensive.Orm.Tests.Sql/Xtensive.Orm.Tests.Sql.csproj

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1212
<WarningLevel>2</WarningLevel>
1313
</PropertyGroup>
14-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
15-
<DefineConstants>TRACE;DEBUG</DefineConstants>
16-
</PropertyGroup>
17-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET6'" Label="Debug">
18-
<DefineConstants>TRACE;DEBUG</DefineConstants>
19-
</PropertyGroup>
20-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET5'" Label="Debug">
21-
<DefineConstants>TRACE;DEBUG</DefineConstants>
22-
</PropertyGroup>
23-
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
24-
<DefineConstants>TRACE</DefineConstants>
25-
</PropertyGroup>
26-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET5'" Label="Release">
27-
<DefineConstants>TRACE</DefineConstants>
28-
</PropertyGroup>
29-
<PropertyGroup Condition="'$(Configuration)'=='Release-NET6'" Label="Release">
30-
<DefineConstants>TRACE</DefineConstants>
31-
</PropertyGroup>
3214
<ItemGroup>
3315
<!-- <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" /> -->
3416
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />

Orm/Xtensive.Orm/Xtensive.Orm.csproj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,18 @@
1616
<WarningLevel>4</WarningLevel>
1717
<NoWarn>1591</NoWarn>
1818
</PropertyGroup>
19-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
20-
<DefineConstants>TRACE;DEBUG</DefineConstants>
21-
</PropertyGroup>
22-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET6'" Label="Debug">
23-
<DefineConstants>TRACE;DEBUG</DefineConstants>
24-
</PropertyGroup>
25-
<PropertyGroup Condition="'$(Configuration)'=='Debug-NET5'" Label="Debug">
26-
<DefineConstants>TRACE;DEBUG</DefineConstants>
27-
</PropertyGroup>
2819
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
2920
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeWeaverFiles</TargetsForTfmSpecificContentInPackage>
30-
<DefineConstants>TRACE</DefineConstants>
3121
<DebugSymbols>true</DebugSymbols>
3222
<DebugType>portable</DebugType>
3323
</PropertyGroup>
3424
<PropertyGroup Condition="'$(Configuration)'=='Release-NET6'" Label="Release">
3525
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeWeaverFiles</TargetsForTfmSpecificContentInPackage>
36-
<DefineConstants>TRACE</DefineConstants>
3726
<DebugSymbols>true</DebugSymbols>
3827
<DebugType>portable</DebugType>
3928
</PropertyGroup>
4029
<PropertyGroup Condition="'$(Configuration)'=='Release-NET5'" Label="Release">
4130
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeWeaverFiles</TargetsForTfmSpecificContentInPackage>
42-
<DefineConstants>TRACE</DefineConstants>
4331
<DebugSymbols>true</DebugSymbols>
4432
<DebugType>portable</DebugType>
4533
</PropertyGroup>

0 commit comments

Comments
 (0)