-
Notifications
You must be signed in to change notification settings - Fork 3
/
Directory.Build.props
19 lines (19 loc) · 1.22 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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 Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
<!--指定自己的体系为native-->
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == ''">native,Version=v0.0</NuGetTargetMoniker>
<!--如果不指定这一行,那么arm64平台会找不到RID而失败-->
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == ''">win;win-x86;win-x64;win-arm;win-arm64</RuntimeIdentifiers>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)\LinuxTarget.props" Condition="exists('$(MSBuildThisFileDirectory)\LinuxTarget.props')"/>
<!--从兼容性考虑,继续向上搜索 Directory.Build.props-->
<PropertyGroup>
<DirectoryBuildPropsPath>$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))</DirectoryBuildPropsPath>
</PropertyGroup>
<Import Project="$(DirectoryBuildPropsPath)" Condition="'$(DirectoryBuildPropsPath)' != ''"/>
</Project>