forked from dotnet/Open-XML-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
64 lines (49 loc) · 3.34 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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--
Since this project supports multiple configurations which don't all have the same surface area, the following define
constants are used to conditionally compile features:
FEATURE_ABSTRACT_XML_CLOSE : XmlWriter.Close is defined as abstract
FEATURE_ARRAY_EMPTY : Array.Empty exists
FEATURE_CLOSE : Stream.Close is available in the platform
FEATURE_PACKAGE_FLUSH : System.IO.Package.Flush will correctly flush all data
NO_CONCURRENT_COLLECTIONS : Concurrent collections are not available
FEATURE_SERIALIZATION : Serialization using ISerializable is in the platform
FEATURE_SCHEMA_GENERATOR : Provides access to helpers to generate schema information
FEATURE_SYSTEMEXCEPTION : SytemException is available in the platform
FEATURE_XML_DISPOSE_PROTECTED : XmlWriter.Dispose is protected
FEATURE_XML_PROHIBIT_DTD : XML settings only has ProhibitDtd property
FEATURE_XML_QUOTECHAR : XmlReader.QuoteChar is an abstract member
FEATURE_XML_SCHEMA : XML Schema is available in the platform
-->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net35' ">
<DefineConstants>$(DefineConstants);FEATURE_PACKAGE_FLUSH;FEATURE_XML_PROHIBIT_DTD;NO_CONCURRENT_COLLECTIONS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net35' OR '$(TargetFramework)' == 'net40' OR '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);FEATURE_ABSTRACT_XML_CLOSE;FEATURE_CLOSE;FEATURE_PACKAGE_FLUSH;FEATURE_SERIALIZATION;FEATURE_SYSTEMEXCEPTION;FEATURE_XML_DISPOSE_PROTECTED;FEATURE_XML_QUOTECHAR;FEATURE_XML_SCHEMA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net46' ">
<DefineConstants> $(DefineConstants);FEATURE_ARRAY_EMPTY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net46' ">
<DefineConstants>$(DefineConstants);FEATURE_ABSTRACT_XML_CLOSE;FEATURE_CLOSE;FEATURE_SCHEMA_GENERATOR;FEATURE_SERIALIZATION;FEATURE_SYSTEMEXCEPTION;FEATURE_XML_QUOTECHAR;FEATURE_XML_SCHEMA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
<DefineConstants>$(DefineConstants);FEATURE_PACKAGE_FLUSH</DefineConstants>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\stylecop.json" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<!-- GitVersionTask is not compiled against .NET Core, so importing the targets will
result in a failure because it will try to resolve Microsoft.Build.Utilities v4.0 -->
<PackageReference Include="GitVersionTask" Version="4.0.0" Condition=" '$(MSBuildRuntimeType)' != 'Core' ">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)\Tests.targets" />
</Project>