linux-packaging-mono/external/corefx/FindConflictingProjectConfigurations.ps1
Xamarin Public Jenkins (auto-signing) 6bdd276d05 Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
2017-04-10 11:41:01 +00:00

39 lines
812 B
PowerShell

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";
}