update script
This commit is contained in:
parent
955bf22740
commit
f33a7e8282
|
|
@ -3,15 +3,14 @@ function Set-FileConfiguration {
|
|||
[string]$filePath
|
||||
)
|
||||
|
||||
$replace1 = "<DebugInformationFormat>EditAndContinue</DebugInformationFormat>"
|
||||
$replace2 = "<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>"
|
||||
$replace = "<DebugInformationFormat>(EditAndContinue|ProgramDatabase)</DebugInformationFormat>"
|
||||
$replaceTo = "<DebugInformationFormat>None</DebugInformationFormat>"
|
||||
|
||||
# Create a copy of .vcxproj file
|
||||
Copy-Item -Path $filePath -Destination ($filePath + '.template')
|
||||
|
||||
# Overlay some configurations
|
||||
Get-Content ($filePath + '.template') -Encoding UTF8 | ForEach-Object { $_ -replace $replace1, $replaceTo; $_ -replace $replace2, $replaceTo; } | Out-File $filePath -Encoding UTF8
|
||||
Get-Content ($filePath + '.template') -Encoding UTF8 | ForEach-Object { $_ -replace $replace, $replaceTo } | Out-File $filePath -Encoding UTF8
|
||||
|
||||
# Delete the copy file
|
||||
Remove-Item -Path ($filePath + '.template')
|
||||
|
|
@ -22,6 +21,6 @@ Get-ChildItem -Path 'projects\' -Directory | ForEach-Object {
|
|||
|
||||
# Search all vcxproj files
|
||||
Get-ChildItem -Path $dirPath *.vcxproj -File | ForEach-Object {
|
||||
Set-FileConfiguration $dirPath + $_
|
||||
Set-FileConfiguration ($dirPath + '\' + $_)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue