@@ -122,6 +122,13 @@ function Test-Template {
122122 }
123123
124124 Write-Verbose " Patching Microsoft.AspNetCore.App from $builtRuntime " ;
125+
126+ # Upload the runtime zip to CI artifacts for analysis
127+ if (Test-Path $builtRuntime ) {
128+ Write-Verbose " Uploading runtime zip to CI artifacts" ;
129+ Write-Host " ##vso[artifact.upload containerfolder=runtime-zip;artifactname=runtime-zip]$builtRuntime " ;
130+ }
131+
125132 Remove-Item " $PSScriptRoot /.runtime" - Recurse - ErrorAction Ignore;
126133 Expand-Archive - Path $builtRuntime - DestinationPath " $PSScriptRoot /.runtime" - Force;
127134
@@ -169,6 +176,13 @@ function Test-Template {
169176 Get-ChildItem " $PSScriptRoot /.dotnet/shared/Microsoft.AspNetCore.App" | ForEach-Object { Write-Verbose " $ ( $_.Name ) " }
170177 }
171178
179+ # Upload shared directory BEFORE patching to CI artifacts
180+ if (Test-Path " $PSScriptRoot /.dotnet/shared" ) {
181+ $beforeSharedPath = " $PSScriptRoot /.dotnet/shared" ;
182+ Write-Verbose " Uploading shared directory BEFORE patching to CI artifacts" ;
183+ Write-Host " ##vso[artifact.upload containerfolder=shared-before;artifactname=shared-before]$beforeSharedPath " ;
184+ }
185+
172186 Write-Verbose " Copying $PSScriptRoot /.runtime/shared/Microsoft.AspNetCore.App to $PSScriptRoot /.dotnet/shared" ;
173187 try {
174188 Copy-Item - Path " $PSScriptRoot /.runtime/shared/Microsoft.AspNetCore.App" - Destination " $PSScriptRoot /.dotnet/shared" - Recurse - Force - ErrorAction Stop;
@@ -184,6 +198,13 @@ function Test-Template {
184198 Get-ChildItem " $PSScriptRoot /.dotnet/shared/Microsoft.AspNetCore.App" | ForEach-Object { Write-Verbose " $ ( $_.Name ) " }
185199 }
186200
201+ # Upload shared directory AFTER patching to CI artifacts
202+ if (Test-Path " $PSScriptRoot /.dotnet/shared" ) {
203+ $afterSharedPath = " $PSScriptRoot /.dotnet/shared" ;
204+ Write-Verbose " Uploading shared directory AFTER patching to CI artifacts" ;
205+ Write-Host " ##vso[artifact.upload containerfolder=shared-after;artifactname=shared-after]$afterSharedPath " ;
206+ }
207+
187208 # Verify critical files were patched correctly
188209 Write-Verbose " Verifying patched runtime files..." ;
189210
0 commit comments