File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/ProjectTemplates/scripts Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -338,11 +338,21 @@ function Test-Template {
338338 }
339339
340340 $publishOutputDir = " ./.publish" ;
341+ $publishBinlogPath = " ./publish.binlog" ;
341342 Write-Verbose " Publishing template to: $publishOutputDir "
342343 Write-Verbose " About to run dotnet publish - final dotnet version check:"
343344 dotnet -- version | ForEach-Object { Write-Verbose " $_ " }
344- Write-Verbose " Running dotnet publish --configuration $Configuration --output $publishOutputDir " ;
345- dotnet.exe publish -- configuration $Configuration -- output $publishOutputDir ;
345+ Write-Verbose " Running dotnet publish --configuration $Configuration --output $publishOutputDir with binary log" ;
346+ dotnet.exe publish -- configuration $Configuration -- output $publishOutputDir - bl:$publishBinlogPath ;
347+
348+ # Upload the publish binlog to CI artifacts for analysis
349+ if (Test-Path $publishBinlogPath ) {
350+ $fullBinlogPath = Resolve-Path $publishBinlogPath ;
351+ Write-Verbose " Uploading publish binlog to CI artifacts: $fullBinlogPath " ;
352+ Write-Host " ##vso[artifact.upload containerfolder=publish-binlog;artifactname=publish-binlog]$fullBinlogPath " ;
353+ } else {
354+ Write-Warning " Publish binlog not found at $publishBinlogPath " ;
355+ }
346356 }
347357 finally {
348358 Pop-Location - StackName TemplateFolder;
You can’t perform that action at this time.
0 commit comments