forked from apache/lucenenet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
140 lines (104 loc) · 7.54 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Project>
<!-- Features in .NET Core 3.x and .NET 5 only -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('netcoreapp')) Or '$(TargetFramework)' == 'net5.0' ">
<DefineConstants>$(DefineConstants);FEATURE_ARGITERATOR</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Standard and .NET Core only (no .NET Framework support) -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcoreapp')) ">
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ARRAYEMPTY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_CULTUREINFO_CURRENTCULTURE_SETTER</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ENCODINGPROVIDERS</DefineConstants>
<DebugType>portable</DebugType>
</PropertyGroup>
<!-- Features in .NET Standard 2.1 only -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' Or $(TargetFramework.StartsWith('netcoreapp3.')) ">
<DefineConstants>$(DefineConstants);FEATURE_CONDITIONALWEAKTABLE_ENUMERATOR</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_CONDITIONALWEAKTABLE_ADDORUPDATE</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Standard 2.x, .NET Core 2.x, and .NET Core 3.x -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard2.')) Or $(TargetFramework.StartsWith('netcoreapp2.')) Or $(TargetFramework.StartsWith('netcoreapp3.')) ">
<DefineConstants>$(DefineConstants);FEATURE_ICONFIGURATIONROOT_PROVIDERS</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Framework 4.5+, .NET Standard 2.x, .NET Core 2.x, and .NET Core 3.x -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net4')) Or $(TargetFramework.StartsWith('netstandard2.')) Or $(TargetFramework.StartsWith('netcoreapp2.')) Or $(TargetFramework.StartsWith('netcoreapp3.')) ">
<DefineConstants>$(DefineConstants);FEATURE_APPDOMAIN_BASEDIRECTORY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_APPDOMAIN_GETASSEMBLIES</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_APPDOMAIN_ISFULLYTRUSTED</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ASSEMBLY_GETCALLINGASSEMBLY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_BITARRAY_COPYTO</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_CONCURRENTMERGESCHEDULER</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_CULTUREINFO_GETCULTURES</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_DTD_PROCESSING</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_FILESTREAM_LOCK</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_METHODBASE_GETMETHODBODY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_STACKTRACE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_TEXTWRITER_CLOSE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_TEXTWRITER_INITIALIZELIFETIMESERVICE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_THREAD_INTERRUPT</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_THREAD_PRIORITY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_THREAD_YIELD</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_TYPE_GETMETHOD__BINDINGFLAGS_PARAMS</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_XSLT</DefineConstants>
<!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface.
To add it to the build, just add /p:IncludeICloneable to the command line. -->
<DefineConstants Condition=" '$(IncludeICloneable)' == 'true' ">$(DefineConstants);FEATURE_CLONEABLE</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Standard 1.x and .NET Core 1.x -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard1.')) Or $(TargetFramework.StartsWith('netcoreapp1.')) ">
<DefineConstants>$(DefineConstants);NETSTANDARD1_X</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Framework 4.6.1+ only -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net461' Or '$(TargetFramework)' == 'net462' Or $(TargetFramework.StartsWith('net47')) Or $(TargetFramework.StartsWith('net48'))">
<DefineConstants>$(DefineConstants);FEATURE_ICONFIGURATIONROOT_PROVIDERS</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Framework 4.6+ only -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net46')) Or $(TargetFramework.StartsWith('net47')) Or $(TargetFramework.StartsWith('net48'))">
<DefineConstants>$(DefineConstants);FEATURE_ARRAYEMPTY</DefineConstants>
</PropertyGroup>
<!-- Features in .NET Framework 4.5+ -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ARGITERATOR</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_MEMORYMAPPEDFILESECURITY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
<!-- Although HostProtectionAttribute is available in .NET Standard 2.0+ via platform extensions, we are excluding
it due to the fact it is not a primary feature of Lucene.NET -->
<DefineConstants>$(DefineConstants);FEATURE_SECURITYPERMISSIONS_HOSTPROTECTION</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_STACKOVERFLOWEXCEPTION__ISCATCHABLE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_TEXTWRITER_CREATEOBJREF</DefineConstants>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup>
<!-- NuGet.org only supports portable debug symbol format:
https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg#nugetorg-symbol-package-constraints -->
<DebugType Condition=" '$(PortableDebugTypeOnly)' == 'true' ">portable</DebugType>
</PropertyGroup>
<Target Name="AddInternalsVisibleTo" BeforeTargets="BeforeCompile" Label="Adds InternalsVisibleTo Attribute and PublicKey (if supplied)">
<ItemGroup Condition="'@(InternalsVisibleTo->Count())' > 0 ">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>%(InternalsVisibleTo.Identity)</_Parameter1>
<_Parameter1 Condition=" '$(SignAssembly)' == 'true' And '$(PublicKey)' != '' ">%(InternalsVisibleTo.Identity), PublicKey=$(PublicKey)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
<Import Project="build\Release.targets" Condition="Exists('build\Release.targets')" />
</Project>