-
Notifications
You must be signed in to change notification settings - Fork 58
/
Directory.Build.props
78 lines (69 loc) · 4.28 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
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
<Project>
<PropertyGroup>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' and ! $([MSBuild]::IsOsPlatform('Windows')) ">net8.0;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' and $([MSBuild]::IsOsPlatform('Windows')) ">net8.0;net6.0;netstandard2.0;net472</TargetFrameworks>
<TargetFrameworks Condition=" '$(PublishAot)' == 'true' ">net8.0</TargetFrameworks>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<PackRelease>false</PackRelease><!-- Prevent `dotnet pack` from defaulting to Release config. -->
<BaseOutputPath>$(MSBuildThisFileDirectory)out/</BaseOutputPath>
<OutputPath>$(BaseOutputPath)bin/$(Configuration)/$(MSBuildProjectName)/</OutputPath>
<PackageOutputPath>$(BaseOutputPath)pkg/</PackageOutputPath>
<SymbolsOutputPath>$(BaseOutputPath)sym/</SymbolsOutputPath>
<BaseIntermediateOutputPath>$(BaseOutputPath)obj/$(Configuration)/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<IsPackable>false</IsPackable>
<!-- Display each test case and passed/failed status when using `dotnet test`. -->
<VSTestLogger Condition="'$(VSTestLogger)' == ''">console%3Bverbosity=normal</VSTestLogger>
<!-- Suppress warnings about using a preview version of .NET. -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup Condition=" '$(PublishAot)' == 'true' ">
<!-- Modify the build output paths when publishing for AOT. This enables separately compiling
AOT and non-AOT flavors of the same project, which is necessary because .NET 8 blocks
dynamic code generation even in the managed assembly if AOT is enabled at compile time. -->
<OutputPath>$(BaseOutputPath)bin/$(Configuration)/$(MSBuildProjectName)/aot/</OutputPath>
<BaseIntermediateOutputPath>$(BaseIntermediateOutputPath)aot/</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<StripSymbols>true</StripSymbols>
</PropertyGroup>
<PropertyGroup Label="Nuget metadata">
<Authors>Microsoft</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/microsoft/node-api-dotnet</PackageProjectUrl>
<Description>Node-API bindings for .Net</Description>
<PackageTags>Node-API;NAPI;Node.JS;JavaScript</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
<NetFramework>true</NetFramework>
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' != 'net472' ">
<NetFramework>false</NetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
<NetStandard>true</NetStandard>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<NetStandard>false</NetStandard>
</PropertyGroup>
<PropertyGroup Condition=" !$(NetFramework) AND !$(NetStandard) ">
<!-- A few runtime features are unavailable in .NET Framework and require conditional compilation. -->
<DefineConstants>$(DefineConstants);STRING_AS_SPAN</DefineConstants>
<DefineConstants>$(DefineConstants);STREAM_MEMORY</DefineConstants>
<DefineConstants>$(DefineConstants);READONLY_SET</DefineConstants>
<!-- The xmldoc markdown tool doesn't support unmanaged delegates. -->
<DefineConstants Condition=" '$(GenerateDocumentationFile)' != 'true' ">$(DefineConstants);UNMANAGED_DELEGATES</DefineConstants>
</PropertyGroup>
<Import Project="./rid.props" />
</Project>