-
Notifications
You must be signed in to change notification settings - Fork 323
/
Directory.Build.targets
73 lines (64 loc) · 3.36 KB
/
Directory.Build.targets
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!--
CI source build leg: this needs to build the current and previous source build TFM. Both are
necessary as the output of this leg is used in other CI source build legs. Those could be
targeting NetCurrent or NetPrevious hence we must produce both.
-->
<PropertyGroup Condition=" '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildOrchestrator)' != 'true' ">
<TargetFrameworks>$(NetPrevious);$(NetCurrent)</TargetFrameworks>
</PropertyGroup>
<!--
Source build the product: this is the all up build of the product which needs only NetCurrent
-->
<PropertyGroup Condition=" '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildOrchestrator)' == 'true' ">
<TargetFrameworks>$(NetCurrent)</TargetFrameworks>
</PropertyGroup>
<!-- Test project settings -->
<Choose>
<When Condition="$(TestProject) == 'true'">
<PropertyGroup>
<!-- Suppress warnings about testhost being x64 (AMD64)/x86 when imported into AnyCPU (MSIL) test projects. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<!-- Test projects are not discovered in test window without test container capability -->
<ItemGroup>
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<!-- Test project references -->
<ItemGroup>
<!--
Test projects take a direct dependency on TestHost. Indirect dependencies must be included.
This is required to enable selfhost the latest testhost bits.
We don't want these references to be passed onto compiler. They are just required at runtime.
Mark them as content and copy to output directory.
-->
<ProjectReference Include="$(RepoRoot)src/testhost/testhost.csproj">
<FromP2P>true</FromP2P>
</ProjectReference>
<ProjectReference Include="$(RepoRoot)src/Microsoft.TestPlatform.CommunicationUtilities/Microsoft.TestPlatform.CommunicationUtilities.csproj">
<FromP2P>true</FromP2P>
</ProjectReference>
<ProjectReference Include="$(RepoRoot)src/Microsoft.TestPlatform.CrossPlatEngine/Microsoft.TestPlatform.CrossPlatEngine.csproj">
<FromP2P>true</FromP2P>
</ProjectReference>
<ProjectReference Include="$(RepoRoot)src/Microsoft.TestPlatform.Common/Microsoft.TestPlatform.Common.csproj">
<FromP2P>true</FromP2P>
</ProjectReference>
<ProjectReference Include="$(RepoRoot)src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj">
<FromP2P>true</FromP2P>
</ProjectReference>
<PackageReference Include="MSTest.Assert.Extensions" Version="$(MSTestAssertExtensionVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="Microsoft.CodeCoverage" Version="$(MicrosoftCodeCoverageVersion)" />
<!--
The following packages are brought by arcade but we don't want to use them as we are testing TP with
currently built version of TP.
-->
<PackageReference Remove="Microsoft.NET.Test.Sdk" />
<PackageReference Remove="Microsoft.TestPlatform" />
</ItemGroup>
</When>
</Choose>
</Project>