Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dir.targets - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 788a01823f2e94a9361860e99ddd3bed578c5451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<Project InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <Target Name="CheckForBuildTools">
    <Error Condition="!Exists('$(ToolsDir)') and '$(OverrideToolsDir)'=='true'"
           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." />
    <Error Condition="!Exists('$(ToolsDir)') and '$(OverrideToolsDir)'!='true'"
           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." />
  </Target>

  <!-- Provide default targets which can be hooked onto or overridden as necessary -->
  <Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
  <Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
  <Target Name="Test" />

  <!-- CoreRT projects are not CLSCompliant by default -->
  <PropertyGroup>
    <CLSCompliant Condition="'$(CLSCompliant)'==''">false</CLSCompliant>
  </PropertyGroup>

  <!-- Set default references for netstandard1.3 -->
  <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
    <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>
    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
    <PackageReference Include="NETStandard.Library">
      <Version>1.6.1</Version>
    </PackageReference>
  </ItemGroup>

  <!-- Set default references for netcoreapp1.1 -->
  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp1.1'">
    <NuGetTargetMoniker>.NETCoreApp,Version=v1.1</NuGetTargetMoniker>
    <!-- This tells VS that this is .NET Core app - uses .NET Core debugger, etc. -->
    <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v1.1</TargetFrameworkVersion>
    <NoWarn>$(NoWarn);1701;1702</NoWarn>
    <!-- Force .dll extension even if output type is exe. -->
    <TargetExt>.dll</TargetExt>
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.1'">
    <PackageReference Include="Microsoft.NETCore.App">
      <Version>1.1.2</Version>
    </PackageReference>
  </ItemGroup>

  <!-- Set non-empty TargetFrameworkIdentifier to avoid defaulting to .NETPortable -->
  <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''">
    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
  </PropertyGroup>

  <PropertyGroup>
    <NugetRuntimeIdentifier Condition="'$(NugetRuntimeIdentifier)' == ''">$(RuntimeIdentifiers)</NugetRuntimeIdentifier>
  </PropertyGroup>

  <Import Project="$(ToolsDir)/Build.Common.targets" />

  <!-- Override corefx multi targeting support -->
  <Target Name="ConvertCommonMetadataToAdditionalProperties" BeforeTargets="AssignProjectConfiguration" />

  <!-- OverrideLicenseUrl is temporary till we update the buildtools to v2 -->  
  <Target Name="OverrideLicenseUrl" BeforeTargets="GenerateNuSpec">
    <PropertyGroup>
      <LicenseUrl>https://github.com/dotnet/corert/blob/master/LICENSE.TXT</LicenseUrl>
    </PropertyGroup>
  </Target>

  <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
         the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
    <!-- We do not want to target a portable profile.
         TODO: Make this the default in buildtools so this is not necessary. -->
    <TargetFrameworkProfile></TargetFrameworkProfile>
    <!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) -->
    <PortableNuGetMode>true</PortableNuGetMode>
  </PropertyGroup>

</Project>