-
Notifications
You must be signed in to change notification settings - Fork 867
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
43 lines (36 loc) · 2.6 KB
/
Copy pathDirectory.Build.props
File metadata and controls
43 lines (36 loc) · 2.6 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
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
<DebugType>portable</DebugType>
</PropertyGroup>
<!-- xUnit3 packages for all test projects (except Test.Utilities which is a library) -->
<ItemGroup Condition="($(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.ComponentTests')) OR $(MSBuildProjectName.EndsWith('.UnitTests'))) AND '$(ExcludeFromTestPackageReferences)' != 'true'">
<PackageReference Include="xunit.v3.mtp-v2" Version="$(XunitVersion)" />
<PackageReference Include="xunit.v3.runner.console" Version="$(XunitRunnerConsoleVersion)" />
<!-- MTP HangDump extension for hang detection (replaces VSTest blame-hang-timeout) -->
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingExtensionsHangDumpVersion)" />
</ItemGroup>
<!-- Enable Microsoft.Testing.Platform runner for all test projects -->
<PropertyGroup Condition="($(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.ComponentTests')) OR $(MSBuildProjectName.EndsWith('.UnitTests'))) AND '$(ExcludeFromTestPackageReferences)' != 'true'">
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>
<PropertyGroup>
<NoOptimizationData>false</NoOptimizationData>
<NoInterfaceData>false</NoInterfaceData>
<CompressMetadata>true</CompressMetadata>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<!-- Test-specific settings for xUnit3/MTP migration -->
<!-- Force x64 for .NET Framework test executables to avoid OOM and sizeof issues.
Note: OutputType isn't available at props evaluation time, so we apply to all net472 test projects
Only apply to actual test runner projects (*.Tests, *.ComponentTests, *.UnitTests), not dynamically generated test fixtures -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net472' AND ($(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.ComponentTests')) OR $(MSBuildProjectName.EndsWith('.UnitTests')))">
<PlatformTarget>x64</PlatformTarget>
<!-- Clear RuntimeIdentifier(s) to avoid conflict with PlatformTarget -->
<RuntimeIdentifier />
<RuntimeIdentifiers />
<!-- Suppress architecture mismatch warnings for test projects that reference x86 compiler tools -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
</Project>