Skip to content

Commit f0c478d

Browse files
authored
clean Microbuild plugins temp dir (#929)
1 parent b999980 commit f0c478d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

build/templates/sign.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ steps:
8282
command: ci
8383
workingDir: '$(Build.SourcesDirectory)'
8484

85+
# Workaround for intermittent MicroBuild plugin install collisions
86+
# (e.g. "An item with the specified name ...\\MicroBuild\\Plugins\\Az.Accounts already exists")
87+
- powershell: |
88+
$pluginsRoot = "$(Agent.TempDirectory)/MicroBuild/Plugins"
89+
$azAccountsDir = Join-Path $pluginsRoot "Az.Accounts"
90+
91+
Write-Host "MicroBuild plugins root: $pluginsRoot"
92+
if (Test-Path $azAccountsDir) {
93+
Write-Host "Removing existing MicroBuild plugin directory: $azAccountsDir"
94+
Remove-Item -LiteralPath $azAccountsDir -Recurse -Force -ErrorAction SilentlyContinue
95+
}
96+
displayName: '🧹 Clean MicroBuild Az.Accounts plugin cache'
97+
8598
# ✅ Enable MicroBuildSigningPlugin for PME enforcement (once for all platforms)
8699
- task: MicroBuildSigningPlugin@4
87100
displayName: Enable MicroBuild Signing

0 commit comments

Comments
 (0)