@@ -243,20 +243,26 @@ function CreateSiteExtensions() {
243
243
if ($minorVersionPrefix -eq " " ) {
244
244
ZipContent $siteExtensionPath " $zipOutput \Functions.$extensionVersion$runtimeSuffix .zip"
245
245
} elseif ($minorVersionPrefix -eq " 8" ) {
246
+ Write-Host " ======================================"
246
247
# Only the "Functions" site extension supports hard links
247
- Write-Host " Removing $hashesForHardLinksPath before zipping."
248
+ Write-Host " MinorVersionPrefix is '8'. Removing $hashesForHardLinksPath before zipping."
248
249
Remove-Item - Force " $hashesForHardLinksPath " - ErrorAction Stop
249
250
# The .NET 8 host doesn't require any workers. Doing this to save space.
250
251
Write-Host " Removing workers before zipping."
251
- Remove-Item - Recurse - Force " $siteExtensionPath \$extensionVersion$runtimeSuffix \workers" - ErrorAction Stop
252
- # The host requires that this folder exists, even if it's empty
253
- New-Item - Itemtype directory - path $siteExtensionPath \$extensionVersion$runtimeSuffix \workers > $null
252
+ # The host requires that this folder exists and it cannot be empty
253
+ Remove-Item - Recurse - Force " $siteExtensionPath \$extensionVersion$runtimeSuffix \workers" - ErrorAction Stop
254
+ New-Item - Path " $siteExtensionPath \$extensionVersion$runtimeSuffix " - Name " workers" - ItemType Directory - ErrorAction Stop | Out-Null
255
+ Set-Content - Force - Path " $siteExtensionPath \$extensionVersion$runtimeSuffix \workers\this_folder_intentionally_empty.txt" - Value " .NET 8 builds do not have workers. However, this folder must contain at least one file." - ErrorAction Stop
256
+ Write-Host " ======================================"
254
257
Write-Host
255
258
ZipContent $siteExtensionPath " $zipOutput \FunctionsInProc8.$extensionVersion$runtimeSuffix .zip"
256
259
} elseif ($minorVersionPrefix -eq " 6" ) {
257
260
# Only the "Functions" site extension supports hard links
258
- Write-Host " Removing $hashesForHardLinksPath before zipping."
261
+ Write-Host " ======================================"
262
+ Write-Host " MinorVersionPrefix is '6'. Removing $hashesForHardLinksPath before zipping."
259
263
Remove-Item - Force " $hashesForHardLinksPath " - ErrorAction Stop
264
+ Write-Host " ======================================"
265
+ Write-Host
260
266
ZipContent $siteExtensionPath " $zipOutput \FunctionsInProc.$extensionVersion$runtimeSuffix .zip"
261
267
}
262
268
@@ -309,7 +315,7 @@ Write-Host
309
315
Write-Host " Output directory: $buildOutput "
310
316
if (Test-Path $buildOutput ) {
311
317
Write-Host " Existing build output found. Deleting."
312
- Remove-Item $buildOutput - Recurse - Force
318
+ Remove-Item $buildOutput - Recurse - Force - ErrorAction Stop
313
319
}
314
320
Write-Host " Extensions version: $extensionVersion "
315
321
Write-Host " "
0 commit comments