Skip to content

Commit

Permalink
Add target to check for Windows SDK presence
Browse files Browse the repository at this point in the history
The Windows SDK plugin for Visual Studio adds a msbuild file that
represents a hidden dependency for the MSBuild build process.

Added a target early in the build process to check for the existence of
this file
  • Loading branch information
cdmihai committed Oct 9, 2015
1 parent a4e0dd5 commit 79f88d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dir.targets
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,11 @@
<Exec Command="$(PackagesDir)\xunit.runner.console.$(XunitVersion)\tools\xunit.console.x86.exe @(MainAssembly, ' ') -noshadow -parallel none -xml %(MainAssembly.FullPath)_TestResults.xml -html %(MainAssembly.FullPath)_TestResults.html > %(MainAssembly.FullPath)_stdout.txt" />
</Target>

<!-- See https://github.com/Microsoft/msbuild/issues/224 -->
<Target Name="EnsureSDKTargetPresent"
BeforeTargets="_RestoreBuildToolsWrapper" >
<Error Condition="!Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\Microsoft.NuGet.ImportAfter.targets')"
Text="MSBuild depends on the 'Tools and Windows SDK' Visual Studio plugin. Please install it. Reference: https://github.com/Microsoft/msbuild/wiki/Building+Testing+and+Debugging" />
</Target>

</Project>

0 comments on commit 79f88d9

Please sign in to comment.