1<Project InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2
3  <Target Name="CheckForBuildTools">
4    <Error Condition="!Exists('$(ToolsDir)') and '$(OverrideToolsDir)'=='true'"
5           Text="The tools directory [$(ToolsDir)] does not exist. Please run sync in your enlistment to ensure the tools are installed before attempting to build an individual project." />
6    <Error Condition="!Exists('$(ToolsDir)') and '$(OverrideToolsDir)'!='true'"
7           Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your enlistment to ensure the tools are installed before attempting to build an individual project." />
8  </Target>
9
10  <!-- Provide default targets which can be hooked onto or overridden as necessary -->
11  <Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
12  <Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
13  <Target Name="Test" />
14
15  <!-- CoreRT projects are not CLSCompliant by default -->
16  <PropertyGroup>
17    <CLSCompliant Condition="'$(CLSCompliant)'==''">false</CLSCompliant>
18  </PropertyGroup>
19
20  <!-- Set default references for netcoreapp2.0 -->
21  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
22    <!-- This tells VS that this is .NET Core app - uses .NET Core debugger, IntelliSense, etc. -->
23    <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
24    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
25  </PropertyGroup>
26
27  <!-- Set default references for netstandard1.3 -->
28  <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
29    <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>
30    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
31    <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>
32  </PropertyGroup>
33  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
34    <PackageReference Include="NETStandard.Library">
35      <Version>1.6.1</Version>
36    </PackageReference>
37  </ItemGroup>
38
39  <!-- Set non-empty TargetFrameworkIdentifier to avoid defaulting to .NETPortable -->
40  <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''">
41    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
42  </PropertyGroup>
43
44  <PropertyGroup>
45    <NugetRuntimeIdentifier Condition="'$(NugetRuntimeIdentifier)' == ''">$(RuntimeIdentifiers)</NugetRuntimeIdentifier>
46  </PropertyGroup>
47
48  <Import Project="$(ToolsDir)Build.Common.targets" Condition="Exists('$(ToolsDir)Build.Common.targets')" />
49
50  <!-- Override corefx multi targeting support -->
51  <Target Name="ConvertCommonMetadataToAdditionalProperties" BeforeTargets="AssignProjectConfiguration" />
52
53</Project>
54