Created
March 4, 2015 19:28
-
-
Save mskutta/0dfc5f4d8d50d4b6d353 to your computer and use it in GitHub Desktop.
(Part2) TDS Project Merge install.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-TDSProject([string]$type) { | |
$matchString = "." + $type.ToLower() | |
$solution = Get-Interface $dte.Solution ([EnvDTE80.Solution2]) | |
foreach ($project in $solution.Projects) { | |
if (($project.Kind -eq "{caa73bb0-ef22-4d79-a57e-df67b3ba9c80}") -and ($project.Name.ToLower().EndsWith($matchString))) { | |
return $project | |
} | |
if (($project.Project.ProjectType -eq "TDS Project") -and ($project.Name.ToLower().EndsWith($matchString))) { | |
return $project | |
} | |
} | |
Write-Host "Could not find TDS Project '$($type)'. Existing projects:" | |
foreach ($project in $solution.Projects) { | |
$name = $project.Name | |
$kind = $project.Kind | |
$type = $project.Project.ProjectType | |
Write-Host " Name: '$($name)', Kind: '$($kind)', Type: '$($type)'" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment