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

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordagood <dagood@microsoft.com>2015-12-08 23:03:09 +0300
committerdagood <dagood@microsoft.com>2015-12-10 01:25:26 +0300
commit0a1eeaad0c4fdd92a19d271795293e752cc10a97 (patch)
tree9785a45f5fe3c09a33ac9bba497a824eb6a14de2 /build.proj
parent0d881222d8c3269157639e2e67056e5a83aad834 (diff)
Add validation and upgrade targets, powered by new buildtools. Make batch restore find all project.json files.
Also removes RestorePackages -> true in many csproj files. It was causing redundant work.
Diffstat (limited to 'build.proj')
-rw-r--r--build.proj28
1 files changed, 28 insertions, 0 deletions
diff --git a/build.proj b/build.proj
index a656e981f3..a02cd0d9ee 100644
--- a/build.proj
+++ b/build.proj
@@ -18,6 +18,7 @@
<PropertyGroup>
<TraversalBuildDependsOn>
+ ValidateAllProjectDependencies;
BatchRestorePackages;
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
@@ -35,6 +36,33 @@
<Exec Condition="'@(_allPackagesConfigs)' != ''" Command="$(NugetRestoreCommand) &quot;%(_allPackagesConfigs.FullPath)&quot;" 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>
+
+ <!-- Tasks from buildtools for easy project.json dependency updates -->
+ <UsingTask TaskName="UpdatePrereleaseDependencies" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+ <UsingTask TaskName="UpdatePackageDependencyVersion" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+
+ <Target Name="UpdatePrereleaseDependencies">
+ <UpdatePrereleaseDependencies ProjectJsons="@(ProjectJsonFiles)"
+ OldPrerelease="$(OldPrerelease)"
+ NewPrerelease="$(NewPrerelease)" />
+ </Target>
+
+ <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" />