This repository has been archived by the owner on Aug 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.proj
89 lines (73 loc) · 3.94 KB
/
build.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
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
82
83
84
85
86
87
88
89
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="dir.props" />
<!-- required to build the projects in their specified order -->
<PropertyGroup>
<SerializeProjects>true</SerializeProjects>
</PropertyGroup>
<PropertyGroup>
<!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
<RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
</PropertyGroup>
<PropertyGroup>
<TraversalBuildDependencies>
BatchRestorePackages;
ValidateExactRestore;
CreateOrUpdateCurrentVersionFile;
CreateVersionInfoFile;
BuildCustomTasks;
</TraversalBuildDependencies>
<TraversalBuildDependsOn>
$(TraversalBuildDependencies);
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
</PropertyGroup>
<ItemGroup>
<Project Include="src/dir.proj" />
<Project Include="src/pkg/packaging/dir.proj"/>
<Project Include="$(MSBuildThisFileDirectory)src/test/dir.proj" Condition="'$(SkipTests)' != 'true'"/>
</ItemGroup>
<Target Name="BuildTraversalBuildDependencies"
DependsOnTargets="$(TraversalBuildDependencies)" />
<Target Name="BuildCustomTasks">
<MSBuild Projects="tools-local/Microsoft.DotNet.Build.Tasks.Local/Microsoft.DotNet.Build.Tasks.Local.builds" />
<MSBuild Projects="tools-local/tasks/core-setup.tasks.builds" />
<PropertyGroup>
<DependencyModelTFM>netstandard1.3</DependencyModelTFM>
<DependencyModelTFM Condition="'$(MSBuildRuntimeType)' != 'Core'">net451</DependencyModelTFM>
</PropertyGroup>
<ItemGroup>
<CustomTaskDependencies Include="$(BuildToolsTaskDir)Newtonsoft.Json.dll" />
<CustomTaskDependencies Include="$(BuildToolsTaskDir)Microsoft.DotNet.PlatformAbstractions.dll" />
<CustomTaskDependencies Include="$(PackagesDir)microsoft.extensions.dependencymodel\1.1.1\lib\$(DependencyModelTFM)\Microsoft.Extensions.DependencyModel.dll" />
</ItemGroup>
<Copy SourceFiles="@(CustomTaskDependencies)"
DestinationFolder="$(LocalBuildToolsTaskDir)"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />
</Target>
<Target Name="BatchRestorePackages" Condition="'$(RestoreDuringBuild)'=='true'">
<Message Importance="High" Text="Restoring all packages..." />
<Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(DotnetRestoreCommand) "%(SdkRestoreProjects.FullPath)" %(SdkRestoreProjects.ExtraRestoreArgs)" StandardOutputImportance="Low" />
</Target>
<!-- Task from buildtools that uses lockfiles to validate that packages restored are exactly what were specified. -->
<UsingTask TaskName="ValidateExactRestore" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
<Target Name="ValidateExactRestore"
Condition="'$(AllowInexactRestore)'!='true'">
<ItemGroup>
<ProjectJsonTemplateFiles Include="$(MSBuildThisFileDirectory)**\project.json.template" />
<ProjectJsonsExcludingTemplateFiles Include="@(ProjectJsonFiles)" Exclude="@(ProjectJsonTemplateFiles)" />
</ItemGroup>
<ValidateExactRestore ProjectLockJsons="@(ProjectJsonsExcludingTemplateFiles->'%(RootDir)%(Directory)%(Filename).lock.json')" />
</Target>
<Import Project="dir.targets" />
<Import Project="dir.traversal.targets" />
<Import Project="$(ToolsDir)clean.targets" />
<Import Project="$(ToolsDir)VersionTools.targets" Condition="Exists('$(ToolsDir)VersionTools.targets')" />
<!-- Override RestorePackages from dir.traversal.targets and do a batch restore -->
<Target Name="RestorePackages" DependsOnTargets="BatchRestorePackages" />
<!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
<Target Name="CleanAllProjects">
<RemoveDir Directories="$(BinDir)" />
</Target>
</Project>