Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add-Type -Path "C:Program Files (x86)Reference AssembliesMicrosoftMSBuildv14.0Microsoft.Build.dll"
- $slnFile = [Microsoft.Build.Construction.SolutionFile]::Parse("<path_to_solution>")
- $slnFile.ProjectsInOrder | Where-Object { $_.ProjectType -eq "KnownToBeMSBuildFormat" } | % {
- $outValue = $null
- $found = $_.ProjectConfigurations.TryGetValue("Debug|Any CPU", [ref]$outValue)
- if($found)
- {
- if($outValue.IncludeInBuild) # This bit is set by the MS code when parsing the project configurations with ...Build.0
- {
- #Do stuff here
- }
- }
- } #End collection iterate
Add Comment
Please, Sign In to add comment