mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-31 12:08:41 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			579 B
		
	
	
	
		
			PowerShell
		
	
	
	
	
	
			
		
		
	
	
			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)
 |