Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Being a PowerShell fan the following reformatted one-liner might be of help:</p> <pre><code>Get-ChildItem -Recurse -Include *.sln | ForEach-Object { $Solution = $_.FullName Get-Content $_ | ForEach-Object { if($_ -match '\{[^\}]+[^=]+= ([^\{\s]*)$') { $matches[1] } } | Sort-Object -Unique | ForEach-Object { $config = ([string]$_).Split([char]'|') &amp; "$env:windir\Microsoft.NET\Framework\v3.5\msbuild.exe" $Solution /p:Configuration="$($config[0])" /p:Platform="$($config[1])" } } </code></pre> <p>This script can be saved as a ps1 file or pasted as a function in your profile. To explain what it does: </p> <ol> <li>find all .sln files in and below the current directory</li> <li>parse the sln extracting the configuration and platform values</li> <li>for each unique configuration platform combination call msbuild with the given solution</li> </ol> <p>--edit: Forgot Split-String is part of <a href="http://www.codeplex.com/Pscx" rel="nofollow noreferrer">PSCX</a>, it's better to use [string] I hope this helps. If you still would like to use MsBuild, it does support a recursive form of the file glob operator via the ".\**\*.sln" syntax see <a href="http://msdn.microsoft.com/en-us/library/ms171454.aspx" rel="nofollow noreferrer">here</a> for details. MsBuild also provides the MsBuild task which can be used to build a set of solutions. I do not know how you can get all 'known' configurations from a solution easily in msbuild. Therefore I choose the PowerShell route. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload