MSBuildSDKsPath (#4824)

* Tests in place

* Implementation
This commit is contained in:
Piotr Puszkiewicz 2016-11-23 23:54:44 -08:00 committed by GitHub
parent 9862fbb4d7
commit 3a3ab7e0b0
7 changed files with 70 additions and 17 deletions

View file

@ -2,6 +2,8 @@
<Project ToolsVersion="14.0" DefaultTargets="Validate"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="build.props" />
<Target Name="Build"
DependsOnTargets="Validate" />
@ -22,13 +24,22 @@
<Target Name="Validate">
<Error Condition=" $(MSBuildNodeCount) &lt; 2 "
Text="Expect MSBuildNodeCount to be greater than 1, but found $(MSBuildNodeCount). Is this a single proc machine?" />
Text="Expected MSBuildNodeCount to be greater than 1, but found $(MSBuildNodeCount). Is this a single proc machine?" />
<Error Condition=" '$(MSBuildExtensionsPath)' == '' "
Text="Expect MSBuildExtensionsPath to be set, but it is not." />
Text="Expected MSBuildExtensionsPath to be set, but it is not." />
<Error Condition=" '$(CscToolExe)' == '' "
Text="Expect CscToolExe to be set, but it is not." />
Text="Expected CscToolExe to be set, but it is not." />
<Error Condition=" '$(MSBuildSDKsPath)' == '' "
Text="Expected MSBuildSDKsPath to be set, but it is not." />
<Error Condition=" !Exists('$(MSBuildSDKsPath)/%(Sdk.Identity)/%(Sdk.Version)/build/InitialImport.props') "
Text="Expected '$(MSBuildSDKsPath)/%(Sdk.Identity)/%(Sdk.Version)/build/InitialImport.props' to exist, but it does not. " />
<Error Condition=" !Exists('$(MSBuildSDKsPath)/%(Sdk.Identity)/%(Sdk.Version)/build/FinalImport.targets') "
Text="Expected '$(MSBuildSDKsPath)/%(Sdk.Identity)/%(Sdk.Version)/build/FinalImport.targets' to exist, but it does not. " />
<Message Importance="low" Text="Message with low importance" />
<Message Importance="normal" Text="Message with normal importance" />

View file

@ -0,0 +1,6 @@
<Project ToolsVersion="14.0" DefaultTargets="Validate">
<ItemGroup>
<Sdk Include="Microsoft.Core.Sdk" Version="1.0.0-RC2" />
<Sdk Include="Microsoft.Web.Sdk" Version="1.0.0-RC2" />
</ItemGroup>
</Project>