Guest User

Untitled

a guest
Jan 19th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Add-Type -Path "C:Program Files (x86)Reference AssembliesMicrosoftMSBuildv14.0Microsoft.Build.dll"
  2.  
  3. $slnFile = [Microsoft.Build.Construction.SolutionFile]::Parse("<path_to_solution>")
  4.  
  5. $slnFile.ProjectsInOrder | Where-Object { $_.ProjectType -eq "KnownToBeMSBuildFormat" } | % {
  6.  
  7. $outValue = $null
  8. $found = $_.ProjectConfigurations.TryGetValue("Debug|Any CPU", [ref]$outValue)
  9.  
  10. if($found)
  11. {
  12. if($outValue.IncludeInBuild) # This bit is set by the MS code when parsing the project configurations with ...Build.0
  13. {
  14. #Do stuff here
  15. }
  16. }
  17. } #End collection iterate
Add Comment
Please, Sign In to add comment