Skip to content

Commit ed8816a

Browse files
author
John Luo
committed
Consolidate ExcludeFromSourceBuild logic
1 parent 2784476 commit ed8816a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Directory.Build.props

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
'$(IsTestAssetProject)' == 'true' OR
3737
'$(IsBenchmarkProject)' == 'true' OR
3838
'$(IsUnitTestProject)' == 'true'">false</IsShipping>
39-
<ExcludeFromSourceBuild Condition="'$(IsSampleProject)' == 'true' OR
40-
'$(IsTestAssetProject)' == 'true' OR
41-
'$(IsBenchmarkProject)' == 'true' OR
42-
'$(IsUnitTestProject)' == 'true' OR
43-
'$(IsSpecificationTestProject)' == 'true'">true</ExcludeFromSourceBuild>
4439

4540
<!--
4641
Following logic mimics core-setup approach as well as

Directory.Build.targets

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
<!-- Only build Microsoft.AspNetCore.App and ref/ assemblies in source build. -->
55
<!-- Analyzer package are needed in source build for WebSDK -->
66
<ExcludeFromSourceBuild
7-
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
7+
Condition="'$(ExcludeFromSourceBuild)' == '' and
8+
'$(DotNetBuildFromSource)' == 'true' and
9+
'$(IsAspNetCoreApp)' != 'true' and
10+
'$(IsAnalyzersProject)' != 'true' and
11+
('$(IsSampleProject)' == 'true' OR
12+
'$(IsTestAssetProject)' == 'true' OR
13+
'$(IsBenchmarkProject)' == 'true' OR
14+
'$(IsUnitTestProject)' == 'true' OR
15+
'$(IsSpecificationTestProject)' == 'true')">true</ExcludeFromSourceBuild>
816

917
<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
1018
suppress all targets for TestProjects using ExcludeFromBuild. -->

0 commit comments

Comments
 (0)