forked from microsoft/powerbi-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
17 lines (15 loc) · 1.03 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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>
<Target Name="ValidatePowerShellExeExists"
BeforeTargets="Restore;$(BuildDependsOn);Build;$(RebuildDependsOn);Rebuild;$(CleanDependsOn);Clean"
Condition=" '$(DesignTimeBuild)' != 'true' ">
<Error Text="This repository requires either Windows PowerShell or PowerShell Core 7 to be installed (default location) to execute builds: $(PowerShellExe)" Condition="!Exists('$(PowerShellExe)')" />
</Target>
</Project>