Skip to content

Instantly share code, notes, and snippets.

@timheuer
Created January 29, 2021 01:09
Show Gist options
  • Save timheuer/f09a190016e86a6ed4357dce0a776e3d to your computer and use it in GitHub Desktop.
Save timheuer/f09a190016e86a6ed4357dce0a776e3d to your computer and use it in GitHub Desktop.
function to launch vs with the first sln or csproj found
function vs {
$p = Get-Location
$sln = gci *.sln,*.csproj -n -recurse | select -f 1
Write-Output "Opening $p\$sln"
Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe" -ArgumentList "$p\$sln"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment