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

tasks.proj « tasks « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e681cfd2740ddc3195412f8aa4f61219122bc9bc (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
<Project Sdk="Microsoft.Build.Traversal">
  <ItemGroup>
    <ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
    <ProjectReference Remove="$(MSBuildThisFileDirectory)AndroidAppBuilder\AndroidAppBuilder.csproj"
                      Condition="'$(TargetOS)' != 'Android'" />
    <ProjectReference Remove="$(MSBuildThisFileDirectory)AppleAppBuilder\AppleAppBuilder.csproj"
                      Condition="'$(TargetOS)' != 'MacCatalyst' and '$(TargetOS)' != 'iOS' and '$(TargetOS)' != 'iOSSimulator' and '$(TargetOS)' != 'tvOS' and '$(TargetOS)' != 'tvOSSimulator'" />
    <ProjectReference Remove="$(MSBuildThisFileDirectory)WasmAppBuilder\WasmAppBuilder.csproj"
                      Condition="'$(TargetOS)' != 'Browser'" />
    <ProjectReference Remove="$(MSBuildThisFileDirectory)WasmBuildTasks\WasmBuildTasks.csproj"
                      Condition="'$(TargetOS)' != 'Browser'" />
    <ProjectReference Remove="$(MSBuildThisFileDirectory)AotCompilerTask\MonoAOTCompiler.csproj"
                      Condition="'$(TargetsMobile)' != 'true'" />
    <ProjectReference Remove="$(MSBuildThisFileDirectory)RuntimeConfigParser\RuntimeConfigParser.csproj"
                      Condition="'$(TargetsMobile)' != 'true'" />
  </ItemGroup>

  <!--
    Use synthetic inputs/outputs to avoid building it all the time. This should let devs build with
    MSBuild node reuse enabled (the Arcade default). If it were built every time, it would hit file
    locking issues vs. the persistent nodes that loaded the task DLL for the previous build. It
    isn't particularly accurate, but better than nothing.
  -->
  <Target Name="BuildIncrementally"
          DependsOnTargets="GetTasksSrc"
          Inputs="@(TasksSrc)"
          Outputs="$(TasksIntermediateFile)">
    <ItemGroup>
      <TaskProject Include="$(MSBuildProjectFullPath)" />
    </ItemGroup>

    <MSBuild Projects="@(TaskProject)"
             Properties="Configuration=Debug;Platform=AnyCPU"
             Targets="Build" />

    <WriteLinesToFile File="$(TasksIntermediateFile)"
                      Lines="$(TasksIntermediateFile)"
                      Overwrite="true" />
  </Target>

  <Target Name="GetTasksSrc"
          DependsOnTargets="PrepareProjectReferences">
    <PropertyGroup>
      <TasksIntermediateFile>$([MSBuild]::NormalizePath('$(ArtifactsObjDir)', '$(MSBuildProjectName)', 'Debug', 'build-semaphore.txt'))</TasksIntermediateFile>
    </PropertyGroup>

    <!-- Include both the project file and its sources as an input. -->
    <ItemGroup>
      <TasksSrc Include="%(ProjectReferenceWithConfiguration.RelativeDir)%(ProjectReferenceWithConfiguration.RecursiveDir)**\*" />
    </ItemGroup>
  </Target>
</Project>