Skip to content

Commit 759906c

Browse files
author
Michael Flanakin
committed
Fix PBI packaging error
1 parent 778b8e4 commit 759906c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/scripts/Package-Toolkit.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ elseif ($ZipPBI)
267267

268268
# Remove docProps from Content_Types
269269
$contentTypes = [xml](Get-Content "$pbixDir/?Content_Types?.xml" -Raw)
270-
$contentTypes.Types.RemoveChild(($contentTypes.Types.Override | Where-Object { $_.PartName -eq '/docProps/custom.xml' })) | Out-Null
270+
$contentTypes.Types.Override | Where-Object {
271+
$_.PartName -eq '/docProps/custom.xml' } | ForEach-Object { $contentTypes.Types.RemoveChild($_) | Out-Null
272+
}
271273
$contentTypes.Save("$pbixDir/[Content_Types].xml") | Out-Null
272274

273275
# Remove unneeded tables

0 commit comments

Comments
 (0)