From ad9f94218a1bece878bea3ed17de71b3425448ea Mon Sep 17 00:00:00 2001
From: Kyaw Thant <kythant@microsoft.com>
Date: Thu, 11 Apr 2024 10:47:32 -0700
Subject: [PATCH 1/4] PDB List'

---
 ...ndowsAppSDK-PackTransportPackage-Stage.yml | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
index 9c147c7bf5..3fdce47550 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
@@ -142,6 +142,27 @@ stages:
       env:
         LIB: $(Build.SourcesDirectory)
 
+  # In the "Publish symbols to SymWeb and MSDL" step, the symbols are automatically stripped in the API.
+  # However, since WindowsAppSDK is public, we don't need to strip them.
+  # So we need to send a list of pdbs to the symbols team that is not needed to be stripped
+  # This task facilitates this.
+  - task: PowerShell@2
+    name: ListUniquePDBs
+    displayName: 'List Unique PDBs and write to pdbs.txt'
+    inputs:
+      targetType: 'inline'
+      script: |
+        $pdbSet = @{}
+        $inputPath = "$(Build.ArtifactStagingDirectory)\symbols"
+        Get-ChildItem *.pdb -Path $inputPath -Recurse | foreach-object {
+          $pdbSet[$_.Name] = $true
+        }
+        foreach ($value in $pdbSet.Keys)
+        {
+          Write-Host $value
+        }
+        $pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt"
+
     # Publishing symbols publicly requires making an API call to the service and is handled by PublishPublicSymbols.ps1
     # in eng/common
     # See this page for more info:

From 21822d17f71e64af15ca994bc597e0a6eddd5373 Mon Sep 17 00:00:00 2001
From: Kyaw Thant <kythant@microsoft.com>
Date: Thu, 11 Apr 2024 10:49:02 -0700
Subject: [PATCH 2/4] indent

---
 ...ndowsAppSDK-PackTransportPackage-Stage.yml | 40 +++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
index 3fdce47550..1ef2488405 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
@@ -142,26 +142,26 @@ stages:
       env:
         LIB: $(Build.SourcesDirectory)
 
-  # In the "Publish symbols to SymWeb and MSDL" step, the symbols are automatically stripped in the API.
-  # However, since WindowsAppSDK is public, we don't need to strip them.
-  # So we need to send a list of pdbs to the symbols team that is not needed to be stripped
-  # This task facilitates this.
-  - task: PowerShell@2
-    name: ListUniquePDBs
-    displayName: 'List Unique PDBs and write to pdbs.txt'
-    inputs:
-      targetType: 'inline'
-      script: |
-        $pdbSet = @{}
-        $inputPath = "$(Build.ArtifactStagingDirectory)\symbols"
-        Get-ChildItem *.pdb -Path $inputPath -Recurse | foreach-object {
-          $pdbSet[$_.Name] = $true
-        }
-        foreach ($value in $pdbSet.Keys)
-        {
-          Write-Host $value
-        }
-        $pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt"
+    # In the "Publish symbols to SymWeb and MSDL" step, the symbols are automatically stripped in the API.
+    # However, since WindowsAppSDK is public, we don't need to strip them.
+    # So we need to send a list of pdbs to the symbols team that is not needed to be stripped
+    # This task facilitates this.
+    - task: PowerShell@2
+      name: ListUniquePDBs
+      displayName: 'List Unique PDBs and write to pdbs.txt'
+      inputs:
+        targetType: 'inline'
+        script: |
+          $pdbSet = @{}
+          $inputPath = "$(Build.ArtifactStagingDirectory)\symbols"
+          Get-ChildItem *.pdb -Path $inputPath -Recurse | foreach-object {
+            $pdbSet[$_.Name] = $true
+          }
+          foreach ($value in $pdbSet.Keys)
+          {
+            Write-Host $value
+          }
+          $pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt"
 
     # Publishing symbols publicly requires making an API call to the service and is handled by PublishPublicSymbols.ps1
     # in eng/common

From ca3ad6087ffc8cdae92b481e157ee7dc1e53b770 Mon Sep 17 00:00:00 2001
From: Kyaw Thant <kythant@microsoft.com>
Date: Thu, 11 Apr 2024 12:47:50 -0700
Subject: [PATCH 3/4] I hate how powershell works different in different
 enviroments

---
 .../WindowsAppSDK-PackTransportPackage-Stage.yml                 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
index 1ef2488405..eff73813f0 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
@@ -161,6 +161,7 @@ stages:
           {
             Write-Host $value
           }
+          New-Item "$(ob_outputDirectory)\pdbs.txt"
           $pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt"
 
     # Publishing symbols publicly requires making an API call to the service and is handled by PublishPublicSymbols.ps1

From 92208da90de51be318b317efa6ac7256fa5749df Mon Sep 17 00:00:00 2001
From: Kyaw Thant <kythant@microsoft.com>
Date: Thu, 11 Apr 2024 14:21:26 -0700
Subject: [PATCH 4/4] why is it like thiss

---
 .../WindowsAppSDK-PackTransportPackage-Stage.yml                | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
index eff73813f0..56364bb6d7 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml
@@ -161,7 +161,7 @@ stages:
           {
             Write-Host $value
           }
-          New-Item "$(ob_outputDirectory)\pdbs.txt"
+          New-Item "$(ob_outputDirectory)\pdbs.txt" -Force
           $pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt"
 
     # Publishing symbols publicly requires making an API call to the service and is handled by PublishPublicSymbols.ps1