-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
Directory.Build.targets
18 lines (14 loc) · 1.01 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<Project>
<Import Project="$(MSBuildThisFileDirectory)/eng/npm.targets" />
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<Compile Include="$(MSBuildThisFileDirectory)/common/AssemblyInfo.cs"
Link="Properties/AssemblyInfo.common.cs" />
</ItemGroup>
<!-- Ensure the latest framework is a target of the project -->
<Target Name="CheckLatestFramework" BeforeTargets="Build" Condition="$(MSBuildProjectFile) != 'build.proj' AND $(MSBuildProjectFile) != 'packages.proj' AND $(ValidateProjectTargets) == true AND $(IsSampleProject) != false AND $(TargetFrameworks.Contains('$(LatestTargetFramework)')) == false">
<Error Text="The project '$(MSBuildProjectFile)' must target $(LatestTargetFramework)" />
</Target>
<PropertyGroup>
<IsTrimmable Condition="$(IsTrimmable) == 'true' AND ($(TargetFramework) == 'net462' OR $(TargetFramework) == 'net471' OR $(TargetFramework) == 'net472' OR $(TargetFramework) == 'netstandard2.0')">false</IsTrimmable>
</PropertyGroup>
</Project>