78 строки
2.9 KiB
XML
78 строки
2.9 KiB
XML
<?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>
|
|
CreateOrUpdateCurrentVersionFile;
|
|
CreateVersionInfoFile;
|
|
CreateHostMachineInfoFile;
|
|
BatchRestorePackages;
|
|
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="CreateHostMachineInfoFile">
|
|
<GetTargetMachineInfo>
|
|
<Output PropertyName="HostMachineRid" TaskParameter="RuntimeIdentifier" />
|
|
</GetTargetMachineInfo>
|
|
|
|
<PropertyGroup>
|
|
<HostMachineInfoPropsContent>
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup>
|
|
<HostMachineRid>$(HostMachineRid)</HostMachineRid>
|
|
</PropertyGroup>
|
|
</Project>
|
|
</HostMachineInfoPropsContent>
|
|
</PropertyGroup>
|
|
|
|
<WriteLinesToFile File="$(HostMachineInfoProps)"
|
|
Lines="$(HostMachineInfoPropsContent)"
|
|
Overwrite="True" />
|
|
</Target>
|
|
|
|
<Target Name="BatchRestorePackages" Condition="'$(RestoreDuringBuild)'=='true'">
|
|
<Message Importance="High" Text="Restoring all packages..." />
|
|
<Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(DotnetRestoreCommand) "%(SdkRestoreProjects.FullPath)" $(MSBuildPassThroughPropertyList)" StandardOutputImportance="Low" />
|
|
</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>
|