Repository navigation
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
88 lines (79 loc) · 4.41 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
88 lines (79 loc) · 4.41 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
78
79
80
81
82
83
84
85
86
87
88
<?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>
<!--
MSB3277: netstandard2.0 product assemblies reference SCI 9.0.0.0 (from the explicit
PackageReference needed for the DTA scenario — see issue #15718), but .NETCoreApp
targets have inbox SCI 8.0.0.0. This is harmless: .NET Core assembly loading is
version-tolerant and will load the available version regardless of the reference.
-->
<MSBuildWarningsAsMessages Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">$(MSBuildWarningsAsMessages);MSB3277</MSBuildWarningsAsMessages>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Publish-for-packaging: lets bundled products publish themselves once into a canonical
folder that the src/package/* tool packages harvest at pack time. Imported after the
Arcade/.NET SDK targets so the Build and Publish targets it hooks are defined. -->
<Import Project="$(RepositoryEngineeringDir)PublishForPackaging.targets" />
<!-- 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>