-
Notifications
You must be signed in to change notification settings - Fork 323
/
Directory.Build.targets
65 lines (57 loc) · 3.06 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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Source build properties -->
<PropertyGroup Condition=" '$(DotNetBuildFromSource)' == 'true' ">
<!-- Force setting TargetFrameworks to net7.0 only if it was set -->
<TargetFrameworks Condition=" '$(TargetFrameworks)' != '' ">$(NetCurrent)</TargetFrameworks>
<!-- Force setting TargetFramework to net7.0 only if it was set -->
<TargetFramework Condition=" '$(TargetFramework)' != '' ">$(NetCurrent)</TargetFramework>
</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>