e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
75 lines
3.2 KiB
XML
75 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="12.0" DefaultTargets="BuildAndTest" 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>
|
|
|
|
<ItemGroup>
|
|
<Project Include="src\dirs.proj" />
|
|
<Project Include="src\sign.builds" />
|
|
<Project Include="src\packages.builds" />
|
|
</ItemGroup>
|
|
|
|
<Import Project="dir.targets" />
|
|
|
|
<Import Project="dir.traversal.targets" />
|
|
|
|
<PropertyGroup>
|
|
<TraversalBuildDependsOn>
|
|
ValidateAllProjectDependencies;
|
|
BatchRestorePackages;
|
|
CreateOrUpdateCurrentVersionFile;
|
|
$(TraversalBuildDependsOn);
|
|
</TraversalBuildDependsOn>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="BatchRestorePackages">
|
|
<Message Importance="High" Text="Restoring all packages..." />
|
|
|
|
<Exec Command="$(DnuRestoreCommand) $(DnuRestoreDirs)" StandardOutputImportance="Low" CustomErrorRegularExpression="^Unable to locate .*" />
|
|
|
|
<ItemGroup>
|
|
<_allPackagesConfigs Include="$(MSBuildProjectDirectory)\src\**\packages.config"/>
|
|
</ItemGroup>
|
|
<Exec Condition="'@(_allPackagesConfigs)' != ''" Command="$(NugetRestoreCommand) "%(_allPackagesConfigs.FullPath)"" StandardOutputImportance="Low" />
|
|
</Target>
|
|
|
|
<!-- Task from buildtools that validates dependencies contained in project.json files. -->
|
|
<UsingTask TaskName="ValidateProjectDependencyVersions" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
|
|
|
|
<Target Name="ValidateAllProjectDependencies"
|
|
Condition="'$(ValidatePackageVersions)'=='true' and '@(ProjectJsonFiles)'!=''">
|
|
<ValidateProjectDependencyVersions ProjectJsons="@(ProjectJsonFiles)"
|
|
ProhibitFloatingDependencies="$(ProhibitFloatingDependencies)"
|
|
ValidationPatterns="@(ValidationPattern)" />
|
|
</Target>
|
|
|
|
<Target Name="UpdateInvalidPackageVersions">
|
|
<ValidateProjectDependencyVersions ProjectJsons="@(ProjectJsonFiles)"
|
|
ProhibitFloatingDependencies="$(ProhibitFloatingDependencies)"
|
|
ValidationPatterns="@(ValidationPattern)"
|
|
UpdateInvalidDependencies="true" />
|
|
</Target>
|
|
|
|
<!-- Tasks from buildtools for easy project.json dependency updates -->
|
|
<UsingTask TaskName="UpdatePackageDependencyVersion" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
|
|
|
|
<Target Name="UpdatePackageDependencyVersion">
|
|
<UpdatePackageDependencyVersion ProjectJsons="@(ProjectJsonFiles)"
|
|
PackageId="$(PackageId)"
|
|
OldVersion="$(OldVersion)"
|
|
NewVersion="$(NewVersion)" />
|
|
</Target>
|
|
|
|
<!-- 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="Clean">
|
|
<RemoveDir Directories="$(BinDir)" />
|
|
</Target>
|
|
|
|
</Project> |