Vanara/Directory.Build.targets

60 lines
2.3 KiB
XML

<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>
<!-- 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>