Last active
August 23, 2017 15:19
-
-
Save Serivy/5cec369c2c0e4332dd835284f3fc5d7b to your computer and use it in GitHub Desktop.
Use new Directory.Build.targets MSBuild 15 system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Import any parent target files. --> | |
<Import Condition="Exists('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., $(MSBuildThisFile)))\$(MSBuildThisFile)')" Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., $(MSBuildThisFile)))\$(MSBuildThisFile)"/> | |
<!-- Include your logic here for the current level. --> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
... | |
<PropertyGroup> | |
<_ImportDirTarget>$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)', 'Directory.Build.targets'))\Directory.Build.targets</_ImportDirTarget> | |
</PropertyGroup> | |
<Import Condition="'$(MSBuildToolsVersion)' < '15' and Exists('$(_ImportDirTarget)')" Project="$(_ImportDirTarget)"/> | |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |
... | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
proj.csproj modifications are needed if you are unsure if building on msbuild < 15.