Replace TFS SourceControl Binding During Migration

buy generic finast online uk [cmdletBinding()]
param
(
[parameter(Mandatory =$true)]
$SLNFile
)
Write-Output $SolutionFile
try
{
$FileCont = Get-Content -Path $SolutionFile
$array = {}
$start = 0..($FileCont.Count – 1) | where { $FileCont[$_] -like “*TeamFoundationVersionControl*”}
$array = $start..($FileCont.Count – 1) | where { $FileCont[$_] -like “*EndGlobalSection*”}
$end = $array[0]
if($start -ne $null)
{
if($FileCont[$end – 2] -like “*Scc*”)
{
$FileList = [System.Collections.Generic.List[System.Object]]$FileCont
$FileList.RemoveRange($start,($end-$start) + 1)
$FiletList | Out-File $SolutionFile -Encoding utf8 -Force
}
else
{
“There is some issue with the selection of end line of source control binding.Please check”
}
}
else
{
“File doesn’t have the source control binding to be removed.”
}
}
Catch
{
Write-Error -Message $SolutionFile
$Message = $_.Message
Write-Error -Message $Message
pause
}

Leave a Reply

go to link Your email address will not be published. Required fields are marked *

source