-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathBuild.props
34 lines (28 loc) · 1.45 KB
/
Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<Project>
<ItemGroup Condition="'$(GeneratePackageSource)' == 'true'">
<ProjectToBuild Include="$(RepoRoot)src\packageSourceGenerator\PackageSourceGenerator.proj" />
</ItemGroup>
<ItemGroup Condition="'$(Test)' == 'true'">
<ProjectToBuild Include="$(RepoRoot)tests\SbrpTests\Sbrp.Tests.csproj" Test="$(Test)" />
</ItemGroup>
<ItemGroup Condition="'$(GeneratePackageSource)' != 'true' and '$(Test)' != 'true'">
<!-- The BuildStep attribute makes the targeting packs build first. -->
<ProjectToBuild Include="$(RepoRoot)src\targetPacks\ILsrc\**\*.csproj" BuildStep="targetingpacks" />
<ProjectToBuild Include="$(RepoRoot)src\textOnlyPackages\src\*\*\*.csproj" />
<ProjectToBuild Include="$(RepoRoot)src\referencePackages\src\**\*.csproj" />
</ItemGroup>
<!--
Adding new projects is somewhat copy-paste heavy and may result in project name overlaps. Catch
that early, as it may cause binclash otherwise.
-->
<Target Name="EnsureUniqueProjectNames"
BeforeTargets="Execute">
<ItemGroup>
<ProjectToBuildName Include="@(ProjectToBuild -> '%(Filename)%(Extension)')" />
<DistinctProjectToBuildName Include="@(ProjectToBuildName->Distinct())" />
</ItemGroup>
<Error
Condition="@(ProjectToBuildName->Count()) != @(DistinctProjectToBuildName->Count())"
Text="A project name is duplicated. Every project name must be distinct to have separate output directories." />
</Target>
</Project>