Skip to content

Commit 89f2846

Browse files
authored
Cleanup csproj files: Remove code duplication for Configuration and entries in Rules project, since it depends on Engine project (#1450)
1 parent 5158f4f commit 89f2846

File tree

2 files changed

+9
-54
lines changed

2 files changed

+9
-54
lines changed

Engine/Engine.csproj

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<DebugType>portable</DebugType>
1717
</PropertyGroup>
1818

19-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
19+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp3.1' ">
2020
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
2121
</PropertyGroup>
2222

@@ -61,29 +61,16 @@
6161
</EmbeddedResource>
6262
</ItemGroup>
6363

64-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Debug'">
64+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
6565
<PackageReference Include="System.Management.Automation" Version="7.0.0" />
6666
</ItemGroup>
67-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Debug'">
67+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
6868
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
6969
</PropertyGroup>
70-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Debug'">
70+
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
7171
<DefineConstants>$(DefineConstants);PSV6;CORECLR</DefineConstants>
7272
</PropertyGroup>
73-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Debug'">
74-
<PackageReference Include="System.Management.Automation" Version="6.1.0" />
75-
</ItemGroup>
76-
77-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Release'">
78-
<PackageReference Include="System.Management.Automation" Version="7.0.0" />
79-
</ItemGroup>
80-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Release'">
81-
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
82-
</PropertyGroup>
83-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Release'">
84-
<DefineConstants>$(DefineConstants);PSV6;CORECLR</DefineConstants>
85-
</PropertyGroup>
86-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Release'">
73+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
8774
<PackageReference Include="System.Management.Automation" Version="6.1.0" />
8875
</ItemGroup>
8976

Rules/Rules.csproj

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,52 +52,20 @@
5252
<Compile Remove="UseSingularNouns.cs" />
5353
</ItemGroup>
5454

55-
<PropertyGroup Condition=" '$(Configuration)' == 'PSV3Release' ">
55+
<PropertyGroup Condition=" '$(Configuration)' == 'PSV3Release' OR '$(Configuration)' == 'PSV3Debug'">
5656
<DefineConstants>$(DefineConstants);PSV3</DefineConstants>
5757
</PropertyGroup>
5858

59-
<PropertyGroup Condition=" '$(Configuration)' == 'PSV4Release' ">
59+
<PropertyGroup Condition=" '$(Configuration)' == 'PSV4Debug' OR '$(Configuration)' == 'PSV4Release'">
6060
<DefineConstants>$(DefineConstants);PSV3;PSV4</DefineConstants>
6161
</PropertyGroup>
6262

63-
<PropertyGroup Condition=" '$(Configuration)' == 'PSV3Debug' ">
64-
<DefineConstants>$(DefineConstants);PSV3</DefineConstants>
65-
</PropertyGroup>
66-
67-
<PropertyGroup Condition=" '$(Configuration)' == 'PSV4Debug' ">
68-
<DefineConstants>$(DefineConstants);PSV3;PSV4</DefineConstants>
69-
</PropertyGroup>
70-
71-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Release'">
72-
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
73-
</PropertyGroup>
74-
75-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Release'">
76-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.0" />
77-
</ItemGroup>
78-
79-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Release'">
80-
<DefineConstants>$(DefineConstants);PSV6;CORECLR</DefineConstants>
81-
</PropertyGroup>
82-
83-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Release'">
84-
<PackageReference Include="System.Management.Automation" Version="6.1.0" />
85-
</ItemGroup>
86-
87-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Debug'">
63+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
8864
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
8965
</PropertyGroup>
9066

91-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' AND '$(Configuration)' == 'PSV7Debug'">
92-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.0" />
93-
</ItemGroup>
94-
95-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Debug'">
67+
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
9668
<DefineConstants>$(DefineConstants);PSV6;CORECLR</DefineConstants>
9769
</PropertyGroup>
9870

99-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(Configuration)' == 'PSV6Debug'">
100-
<PackageReference Include="System.Management.Automation" Version="6.1.0" />
101-
</ItemGroup>
102-
10371
</Project>

0 commit comments

Comments
 (0)