summaryrefslogtreecommitdiff
path: root/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19577.5/sdk/Sdk.targets
blob: 9a7667498fa62c005175bdbf8c11eac5da1c32d8 (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
<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
  <!--
    If a project specifies ExcludeFromSourceBuild=true during a source build suppress all targets and emulate a no-op
    (empty common targets like Restore, Build, Pack, etc.).
  -->
  <PropertyGroup>
    <_SuppressAllTargets>false</_SuppressAllTargets>
    <_SuppressAllTargets Condition="'$(DotNetBuildFromSource)' == 'true' and '$(ExcludeFromSourceBuild)' == 'true'">true</_SuppressAllTargets>
  </PropertyGroup>

  <!-- 
    Output the location of the Build.proj so that the build driver can find where it was restored.
    Ideally we would have msbuild API to do that for an SDK: https://github.com/Microsoft/msbuild/issues/2992
  -->
  <Target Name="__WriteToolsetLocation" Outputs="$(__ToolsetLocationOutputFile)" Condition="'$(__ToolsetLocationOutputFile)' != ''">
    <WriteLinesToFile File="$(__ToolsetLocationOutputFile)" Lines="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\Build.proj'))" Overwrite="true"/>
    <ItemGroup>
      <FileWrites Include="$(__ToolsetLocationOutputFile)" />
    </ItemGroup>
  </Target>

  <Import Project="..\tools\Imports.targets" Condition="!$(_SuppressSdkImports) and !$(_SuppressAllTargets)" />
  <Import Project="..\tools\Empty.targets" Condition="!$(_SuppressSdkImports) and $(_SuppressAllTargets)"/>
</Project>