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

FindConflictingProjectConfigurations.ps1 - github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a871efd978aee950b88f085b8c7a50622f273c00 (plain)
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
msbuild /nologo /v:quiet build.proj /t:build /flp1:v=detailed`;LogFile=dumptargets.log /p:SkipTests=true

$targets = gc dumptargets.log | ? { $_.Contains("DumpTargets>") -or ($_.Contains("is building") -and ($_.Contains("default target") -or $_.Contains("Build"))) }

$ht = new-object Hashtable
$duplicates = @();
$foundConflict = $false;
$lastIsBuilding = "";

foreach($target in $targets)
{
  #"->" + $target
  if ($target.Contains("is building"))
  {
    $lastIsBuilding = $target;
    continue;
  }

  if ($ht.Contains($target))
  {
    $buildingProject = $ht[$target];

    "Conflict:"
    "$target"
    "1> $buildingProject"
    "2> $lastIsBuilding"
    "`n"
    $foundConflict = $true;
  }
  else
  {
    $ht.Add($target, $lastIsBuilding);
  }
}

if ($foundConflict -eq $false)
{
  "Found no conflicts";
}