Skip to content

Commit 1a48ef6

Browse files
Add extra verboisty parameter to slngen script and add to run in CI as artifacts
1 parent 00978bc commit 1a48ef6

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

GenerateAllSolution.ps1

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
List of TFM based projects to include. This can be 'all', 'uwp', or 'winappsdk'.
1111
1212
Defaults to 'all' for local-use.
13+
.PARAMETER UseDiagnostics
14+
Add extra diagnostic output to running slngen, such as a binlog, etc...
1315
.EXAMPLE
1416
C:\PS> .\GenerateAllSolution -IncludeHeads winappsdk
1517
Build a solution that doesn't contain UWP projects.
@@ -20,7 +22,10 @@
2022
Param (
2123
[Parameter(HelpMessage = "The heads to include for building platform samples and tests.", ParameterSetName = "IncludeHeads")]
2224
[ValidateSet('all', 'uwp', 'winappsdk')]
23-
[string]$IncludeHeads = 'all'
25+
[string]$IncludeHeads = 'all',
26+
27+
[Parameter(HelpMessage = "Add extra diagnostic output to slngen generator.")]
28+
[switch]$UseDiagnostics = $false
2429
)
2530

2631
# Generate required props for "All" solution.
@@ -77,7 +82,16 @@ if ($IncludeHeads -ne 'uwp')
7782
[void]$projects.Add(".\labs\**\samples\*.Samples\*.Samples.csproj")
7883
[void]$projects.Add(".\labs\**\tests\*.Tests\*.shproj")
7984

80-
$cmd = "dotnet slngen -o $generatedSolutionFilePath $slngenConfig --platform $platforms $($projects -Join ' ')"
85+
if ($UseDiagnostics.IsPresent)
86+
{
87+
$diagnostics = '-bl:slngen.binlog --consolelogger:"ShowEventId;Summary;Verbosity=Detailed" --filelogger:"LogFile=slngen.log;Append;Verbosity=Diagnostic;Encoding=UTF-8" '
88+
}
89+
else
90+
{
91+
$diagnostics = ""
92+
}
93+
94+
$cmd = "dotnet slngen -o $generatedSolutionFilePath $slngenConfig $diagnostics--platform $platforms $($projects -Join ' ')"
8195

8296
Write-Output "Running Command: $cmd"
8397

0 commit comments

Comments
 (0)