forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.proj
40 lines (35 loc) · 1.56 KB
/
tasks.proj
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
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
</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>