-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
20 lines (17 loc) · 1.38 KB
/
Directory.Build.targets
File metadata and controls
20 lines (17 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Sdk Name="Microsoft.Build.CentralPackageVersions" />
<!-- Ensure developers are using a minimun supported version of VS -->
<Target Name="ValidateMinimumMsBuildVersion"
BeforeTargets="Restore;$(BuildDependsOn);Build;$(RebuildDependsOn);Rebuild;$(CleanDependsOn);Clean"
Condition=" '$(DesignTimeBuild)' != 'true' ">
<Error Text="Building this repository requires a minimun Visual Studio version of $(MinimumMSBuildVersion)" Condition="$(MSBuildVersion) < $(MinimumMSBuildVersion)" />
</Target>
<!-- Speed up incremental builds in VS and support interface-aware caching -->
<PropertyGroup>
<ProduceReferenceAssembly Condition="'$(MSBuildProjectExtension)' == '.csproj' And '$(UsingMicrosoftNoTargetsSdk)' != 'true' and '$(FakesGenerated)' != 'true'">true</ProduceReferenceAssembly>
<!-- Copied from Microsoft.CurrentVersion.targets, since the import order of Directory.Build.targets will cause TargetRefPath to evaluate to empty. -->
<TargetRefPath Condition="'$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true'">$([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))</TargetRefPath>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)build\ToolsPackage.targets" Condition="'$(IsTool)' == 'true'" />
</Project>