-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
77 lines (68 loc) · 3.55 KB
/
Directory.Build.targets
File metadata and controls
77 lines (68 loc) · 3.55 KB
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
74
75
76
77
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- Temporary workaround for Arcade issue in net9-preview5 -->
<_NetFrameworkHostedCompilersVersion Condition="'$(_NetFrameworkHostedCompilersVersion)' == ''">4.11.0-3.24280.3</_NetFrameworkHostedCompilersVersion>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(IsFilterSourcePackage)' != 'true'">$(DefineConstants);IS_VSTEST_REPO</DefineConstants>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Override the version of imported package to avoid infinite restore loop in VisualStudio, https://github.com/dotnet/arcade/issues/16228 -->
<ItemGroup>
<PackageReference Update="Microsoft.VSSDK.BuildTools"
Version="$(_MicrosoftVSSDKBuildToolsVersion_)"
PrivateAssets="all" />
</ItemGroup>
<!--
Source build the product: this is the all up build of the product which needs only NetCurrent
-->
<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<TargetFrameworks>$(NetCurrent)</TargetFrameworks>
</PropertyGroup>
<!-- Test project settings -->
<Choose>
<When Condition="$(TestProject) == 'true' AND '$(ExcludeRepoTestProjectSettings)' != '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="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>