winfsp/tools/gensrc/remove-vcxproj-config.ps1
Bill Zissimopoulos 6ab1ed3b7f
tools: remove-all-arm64
Add script to remove ARM64 project configurations for builds on VS2015
2021-12-16 11:30:09 +00:00

21 lines
579 B
PowerShell

param (
[Parameter(Mandatory)][string]$Path,
[Parameter(Mandatory)][string[]]$ProjectConfiguration
)
$file = Get-Item $Path
$xmlob = New-Object xml
$xmlob.PreserveWhitespace = $true
$xmlob.Load($file.FullName)
$xmlns = @{"msbuild" = "http://schemas.microsoft.com/developer/msbuild/2003"}
$configs = Select-Xml -Xml $xmlob -Namespace $xmlns `
-XPath "//msbuild:ProjectConfiguration[contains(@Include,'$ProjectConfiguration')]"
foreach ($config in $configs) {
$child = $config.Node
[void]$child.ParentNode.RemoveChild($child)
}
$xmlob.Save($file.FullName)