forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
65 lines (54 loc) · 3.46 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"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<ItemGroup>
<SupportedPlatform Remove="Android" />
<SupportedPlatform Remove="iOS" />
</ItemGroup>
<ItemGroup>
<!--
The System.Threading.Tasks global import interferes with Microsoft.Build.Utilities.Task that is used extensively
in this repository. Remove it to avoid the conflict.
-->
<Import Remove="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true' AND '$(OutputType)' == 'Exe' AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<PackageReference Include="xunit.console" Private="true" />
<!-- These files are both included via a .props file in xunit.runner.visualstudio, as well as
via package dependencies of xunit.console. To prevent warnings about duplicate files
from Pack, don't copy the ones from the .props file to the output directory. -->
<None Update="@(None)">
<CopyToOutputDirectory Condition="'%(Filename)' == 'xunit.runner.utility.netcoreapp10'">false</CopyToOutputDirectory>
<CopyToOutputDirectory Condition="'%(Filename)' == 'xunit.runner.reporters.netcoreapp10'">false</CopyToOutputDirectory>
</None>
<!-- These files are included by the Microsoft.TestPlatform.TestHost package, but we don't want them in the .NET Tool NuGet package
(by default they would go in the content and contentFiles folders, generating NU5100 warnings. -->
<Content Update="@(Content)">
<Pack Condition="$([System.IO.Path]::GetFileName('%(Identity)')) == 'testhost.exe'">false</Pack>
<Pack Condition="$([System.IO.Path]::GetFileName('%(Identity)')) == 'testhost.dll'">false</Pack>
</Content>
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Optionally override arcade's test target with one which will run the tests as tools.
Conditionally overriding a target requires a conditional import of another (.targets)
file. -->
<Import Project="OverrideTest.targets"
Condition="'$(RunTestsAsTool)' == 'true' And '$(CanRunTestAsTool)' == 'true'"/>
<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>
<ItemGroup Condition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReference Update="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>
</Project>