-
Notifications
You must be signed in to change notification settings - Fork 196
/
Directory.Build.targets
69 lines (62 loc) · 2.79 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
<Project>
<!-- Add common settings for all projects -->
<PropertyGroup>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);$(PlatformTarget)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ALLOWSPAN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR)' == 'true' Or '$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
<Reference Include="System" />
</ItemGroup>
<!-- Rebuild any x86 platform again with x64 -->
<!--<Target Name="AfterCompile">
<MSBuild Condition=" '$(Platform)' == 'x86' " Projects="$(MSBuildProjectFile)" Properties="Platform=x64;PlatFormTarget=x64" RunEachTargetSeparately="true" />
</Target>
<PropertyGroup Condition=" '$(UseX64)' != '' ">
<NuspecFile>$(MSBuildThisFileDirectory)x64.nuspec</NuspecFile>
<NuspecProperties>packageicon=$(PackageIcon);notes=$(PackageReleaseNotes);tags=$(PackageTags);projdir=$(MSBuildProjectDirectory)</NuspecProperties>
</PropertyGroup>-->
<!-- Establish exclude pattern for files starting with ~ -->
<ItemGroup>
<Compile Remove="**\~*.cs" />
<None Include="**\~*.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="**\~*.vb" />
<None Include="**\~*.vb" />
</ItemGroup>
<!-- Establish include pattern for package readme files -->
<ItemGroup>
<None Include="**\pkgreadme.md" Pack="true" PackagePath="\" />
</ItemGroup>
<!-- Define Net5OrAbove variable -->
<PropertyGroup>
<Net5OrAbove>false</Net5OrAbove>
<Net5OrAbove Condition=" $(TargetFramework.StartsWith('net5')) Or $(TargetFramework.StartsWith('net6')) Or $(TargetFramework.StartsWith('net7')) ">true</Net5OrAbove>
</PropertyGroup>
<!-- Explicit target settings for .NET 5 or above -->
<PropertyGroup Condition=" $(Net5OrAbove) ">
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<ImportWindowsDesktopTargets>false</ImportWindowsDesktopTargets>
<UseWindowsForms>false</UseWindowsForms>
<UseWPF>false</UseWPF>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
<!-- Explicit DEBUG target settings for .NET 5 or above -->
<PropertyGroup Condition=" '$(Configuration)'=='Debug' And $(Net5OrAbove)">
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
</PropertyGroup>
<!-- Explicit FrameworkReference in .NET 5 or above -->
<ItemGroup Condition=" $(Net5OrAbove) ">
<SupportedPlatform Include="Windows" />
<FrameworkReference Include="Microsoft.NETCore.App" PrivateAssets="all" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App" PrivateAssets="all" />
</ItemGroup>
</Project>