DevUtils.psm1

function Stop-Processes {
    [CmdletBinding()]
    param(
        [Parameter()]
        [string[]] $ProcessesToStop = @('msbuild', 'dotnet', 'vbcscompiler'),

        [Parameter()]
        [switch] $WhatIf
    )

    Log info 'Killing running build processes...'

    $getProcesses = { Get-Process -ErrorAction SilentlyContinue | Select-Object Id, ProcessName, Path | Where-Object { $ProcessesToStop -contains $_.ProcessName } }

    # $sb = [System.Text.StringBuilder]::new()

    $retries = 255
    $milliseconds = 75
    do {
        try {
            $processes = & $getProcesses
            foreach ($process in $processes) {
                # Original version
                # Write-Host 'Try to stop process: ' -NoNewline
                # Write-Host $($process.ProcessName) -NoNewline -ForegroundColor White
                # Write-Host ' -> ' -NoNewline -ForegroundColor DarkGray
                # Write-Host "'$($process.Path)'" -ForegroundColor DarkGray

                # PoshGit's ANSI console version (should adapted)
                # $sb.Clear() > $null
                # $sb | Write-Prompt 'Try to stop process ' > $null
                # $sb | Write-Prompt $($process.ProcessName) -ForegroundColor ([ConsoleColor]::White) > $null
                # $sb | Write-Prompt ' -> ' -ForegroundColor ([ConsoleColor]::DarkGray) > $null
                # $sb | Write-Prompt "'$($process.Path)'" -ForegroundColor ([ConsoleColor]::DarkGray) > $null
                # Log info ($sb.ToString())

                Log info "Try to stop process: '$($process.ProcessName)' -> '$($process.Path)'"
                if (-not $WhatIf.IsPresent) {
                    Stop-Process -Id $process.Id
                }
            }
        } catch { }

        Start-Sleep -Milliseconds $milliseconds
        --$retries

        $processes = & $getProcesses
    } while ($processes -and ($retries -gt 0))
}

function Get-VisualStudioVersions() {
    $installations = [VisualStudio.Setup.Core.VisualStudio]::GetInstalled()
    return $installations
}

function Get-ProductSemanticVersionShortList() {
    return Get-VisualStudioVersions | Select-Object -ExpandProperty ProductSemanticVersionShort
}

function Export-DefaultVisualStudioVersion([string] $Version) {
    $filePath = Join-Path (Join-Path $env:LOCALAPPDATA 'Microsoft/VisualStudio') 'Common.json'
    $content = @{ DefaultVersion = $Version }
    $content | ConvertTo-Json -Compress | Out-File -FilePath $filePath -Force -NoNewline -Encoding utf8NoBOM
}

function Import-DefaultVisualStudioVersion() {
    $filePath = Join-Path (Join-Path $env:LOCALAPPDATA 'Microsoft/VisualStudio') 'Common.json'

    if (Test-Path $filePath) {
        $content = Get-Content $filePath -Raw | ConvertFrom-Json
        return $content.DefaultVersion
    }

    return $null
}

function Get-DefaultVisualStudioVersion() {
    $defaultVisualStudioVersion = Import-DefaultVisualStudioVersion
    return Get-VisualStudioVersions | Where-Object ProductSemanticVersionShort -eq $defaultVisualStudioVersion | Select-Object -First 1
}

function Set-DefaultVisualStudioVersion {
    [CmdletBinding()]
    param()
    DynamicParam {
        New-DynamicParameter -Name 'Version' -ValidateSet (Get-ProductSemanticVersionShortList)
    }

    Begin {
        $Version = $PSBoundParameters['Version']
    }

    Process {
        Export-DefaultVisualStudioVersion $Version
    }
}

function EnumerateFiles([string] $path, [string[]] $searchPattern) {
    $files = [System.Collections.ArrayList]@()

    foreach ($pattern in $searchPattern) {
        foreach ($item in [System.IO.Directory]::EnumerateFiles($path, $pattern, [System.IO.SearchOption]::AllDirectories)) {
            $files.Add($item) > $null
        }
    }

    return $files
}

function Get-VisualStudioSolutions {
    [CmdletBinding()]
    param(
        [Parameter()]
        [string] $RootPath = (Get-Location)
    )

    $RootPath = Resolve-Path $RootPath

    # $solutionFiles = EnumerateFiles -path $RootPath -searchPattern @('*.sln', '*.slnf')
    $solutionFiles = [VisualStudio.Setup.Core.FindFiles]::GetFilesWithExtension($RootPath, @('.sln', '.slnf'))

    $solutions = [ordered]@{ }
    for ($i = 0; $i -lt $solutionFiles.Count; ++$i) {
        $item = Get-Item $solutionFiles[$i]
        $solution = [pscustomobject]@{
            BaseName     = $item.BaseName
            RelativePath = Resolve-Path -Path $item.FullName -Relative
            FullName     = $item.FullName
        }

        $solutions.Add($i, $solution)
    }

    return $solutions
}

function Write-VisualStudioSolutions {
    [CmdletBinding()]
    param(
        [Parameter()]
        [string] $RootPath = (Get-Location),

        [Parameter()]
        [pscustomobject] $VisualStudioSolutions = $null
    )

    if ($VisualStudioSolutions -eq $null) {
        $VisualStudioSolutions = Get-VisualStudioSolutions $RootPath
    }

    if ($VisualStudioSolutions.Count -lt 1) {
        Write-Host 'Could not found any solution' -ForegroundColor DarkRed
        return
    }

    $maxLengthPosition = 0
    $maxLengthBasename = 0
    foreach ($solution in $VisualStudioSolutions.GetEnumerator()) {
        $maxLengthPosition = ([string]($solution.Key + 1)).Length
        if ($solution.Value.BaseName.Length -gt $maxLengthBasename) {
            $maxLengthBasename = $solution.Value.BaseName.Length
        }
    }

    Write-Host 'Please select a solution:' -ForegroundColor Cyan
    foreach ($solution in $VisualStudioSolutions.GetEnumerator()) {
        Write-Host "[$(($solution.Key + 1).ToString().PadLeft($maxLengthPosition, '0'))] " -ForegroundColor Yellow -NoNewline
        Write-Host "$($solution.Value.BaseName.PadRight($maxLengthBasename, ' ')) " -ForegroundColor Green -NoNewline
        Write-Host "($(Resolve-Path -Path $solution.Value.FullName -Relative))"
    }
}

filter IsNumeric() {
    return $_ -is [byte] -or $_ -is [int16] -or $_ -is [int32] -or $_ -is [int64] -or $_ -is [sbyte] -or $_ -is [uint16] -or $_ -is [uint32] -or $_ -is [uint64] -or $_ -is [float] -or $_ -is [double] -or $_ -is [decimal] -or $_ -match "^\d+$"
}

function Start-VisualStudio {
    [CmdletBinding()]
    param(
        [Parameter()]
        [switch] $WhatIf
    )
    DynamicParam {
        $dict = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary
        $solutionValidateSet = @()
        $solutionValidateSet += (Get-VisualStudioSolutions).Values.RelativePath
        $solutionValidateSet += (Get-VisualStudioSolutions).Keys | ForEach-Object { $_ + 1 }
        New-DynamicParameter -Name 'Solution' -Position 0 -ValidateSet $solutionValidateSet -DPDictionary $dict
        New-DynamicParameter -Name 'Version' -Position 1 -ValidateSet (Get-ProductSemanticVersionShortList) -DPDictionary $dict
        return $dict
    }

    Begin {
        $Solution = $PSBoundParameters['Solution']
        if (-not $Solution) {
            $Solution = (Get-VisualStudioSolutions).GetEnumerator() | Select-Object -First 1 | Select-Object -ExpandProperty Value | Select-Object -ExpandProperty RelativePath
        }

        if ($Solution | IsNumeric) {
            $solutionIndex = [int]::Parse($Solution) - 1
            $Solution = (Get-VisualStudioSolutions)[$solutionIndex] | Select-Object -ExpandProperty RelativePath
        }

        $Version = $PSBoundParameters['Version']
        if (-not $Version) {
            $visualStudioVersion = Get-DefaultVisualStudioVersion
        } else {
            $visualStudioVersion = Get-VisualStudioVersions | Where-Object ProductSemanticVersionShort -eq $Version | Select-Object -First 1
        }
    }

    Process {
        $solutionPath = Resolve-Path $Solution
        $solutionItem = Get-Item $solutionPath
        if (-not (Test-Path $solutionPath)) {
            Log error "File '$solutionPath' does not exists"
            return
        }

        if (-not $visualStudioVersion) {
            Log error "Visual Studio version '$Version' does not exists"
            return
        }

        $maxLengthProductVersion = "Visual Studio $($visualStudioVersion.ProductLineVersion)".Length

        Write-Host '-> ' -ForegroundColor Yellow -NoNewline
        Write-Host "$($solutionItem.BaseName.PadRight($maxLengthProductVersion, ' ')) " -ForegroundColor Green -NoNewline
        Write-Host "($(Resolve-Path -Path $solutionItem.FullName -Relative))"
        Write-Host '-> ' -ForegroundColor Yellow -NoNewline
        Write-Host "Visual Studio $($visualStudioVersion.ProductLineVersion) " -ForegroundColor Green -NoNewline
        Write-Host "(v$($visualStudioVersion.ProductSemanticVersionShort))"

        $instances = [VisualStudio.Setup.Core.VisualStudioController]::GetRunningVisualStudioDTEs($visualStudioVersion.InstallationVersion)

        $otherSolutionIsOpened = $false
        foreach ($dte in $instances) {
            if (-not $dte.Solution.IsOpen) {
                Write-Host '-> ' -ForegroundColor Yellow -NoNewline
                Write-Host 'Open solution in existing Visual Studio instance' -ForegroundColor Green

                if (-not $WhatIf.IsPresent) {
                    $dte.Solution.Open($solutionItem.FullName)
                }
                return
            } else {
                $otherSolutionIsOpened = $true
            }
        }

        if ($otherSolutionIsOpened) {
            Write-Host '-> ' -ForegroundColor Yellow -NoNewline
            Write-Host 'Another solution or folder is already open in Visual Studio' -ForegroundColor Green
        }

        Write-Host '-> ' -ForegroundColor Yellow -NoNewline
        Write-Host 'Create new Visual Studio instance' -ForegroundColor Green

        if (-not $WhatIf.IsPresent) {
            & $visualStudioVersion.DevEnvPath $solutionItem.FullName
        }
    }
}

function Clear-NuGetCache {
    Start-NativeExecution dotnet nuget locals all --clear
}

New-Alias kp Stop-Processes
New-Alias vs Start-VisualStudio
New-Alias vss Write-VisualStudioSolutions
# SIG # Begin signature block
# MIIcjgYJKoZIhvcNAQcCoIIcfzCCHHsCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC1gRM7Sox6ywrE
# +hwm+xJ9lV3wsFaJNX1XAPJI9UDVg6CCF5gwggUhMIIECaADAgECAhAIWwDz5iwy
# UtohxU7HR7bMMA0GCSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNV
# BAMTKERpZ2lDZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcN
# MTkwMzEyMDAwMDAwWhcNMjAwMzE2MTIwMDAwWjBeMQswCQYDVQQGEwJERTEfMB0G
# A1UEBxMWR2FybWlzY2gtUGFydGVua2lyY2hlbjEWMBQGA1UEChMNTWFudWVsIFRh
# bnplcjEWMBQGA1UEAxMNTWFudWVsIFRhbnplcjCCASIwDQYJKoZIhvcNAQEBBQAD
# ggEPADCCAQoCggEBAPIHE2FyXkrHpGfPf80N/4sJPgORb+Br0+wCuJSD8BMRNB40
# 1Rmn2dcq7IEfvud6qCdnxo/jLmTWNiEb7dr+NcRvIggi5yUM48DjpUnYp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