-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.props
26 lines (25 loc) · 1.77 KB
/
Directory.Build.props
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
<!--强制引入PackageReferences-->
<ProjectCapability Include="PackageReferences" />
</ItemGroup>
<PropertyGroup Label="NuGet" Condition="('$(MSBuildProjectExtension)' == '.vcxproj') Or ('$(MSBuildProjectExtension)' == '.wapproj')">
<!-- https://github.com/microsoft/react-native-windows/pull/8195 -->
<AssetTargetFallback>$(AssetTargetFallback);native;uap$(TargetPlatformVersion);</AssetTargetFallback>
<!-- https://github.com/microsoft/react-native-windows/pull/8195 -->
<TargetFrameworkMoniker>native,Version=v0.0</TargetFrameworkMoniker>
<!--指定自己的体系为native-->
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == ''">native,Version=v0.0</NuGetTargetMoniker>
<TargetFrameworkMoniker Condition ="'$(DesignTimeBuild)' == 'true'">.NETCore,Version=v5.0</TargetFrameworkMoniker>
<NuGetTargetMoniker Condition ="'$(DesignTimeBuild)' == 'true'">.NETCore,Version=v5.0</NuGetTargetMoniker>
<!--如果不指定这一行,那么arm64平台会找不到RID而失败-->
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == ''">win;win-x86;win-x64;win-arm;win-arm64;win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
</PropertyGroup>
<!--从兼容性考虑,继续向上搜索 Directory.Build.props-->
<PropertyGroup>
<NoWarn>CS0169;CS0649;NU1701;NU1702</NoWarn>
<DirectoryBuildPropsPath>$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))</DirectoryBuildPropsPath>
</PropertyGroup>
<Import Project="$(DirectoryBuildPropsPath)" Condition="'$(DirectoryBuildPropsPath)' != ''" />
</Project>