Powershell script for VS build and deploy
$solutionName = "$PSScriptRoot/SWSC.sln" dotnet restore $solutionName function Get-MsBuildPath() { $vsWherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" if ((Test-Path $vsWherePath) -eq $false) { throw "It seems you have no Visual Studio installed. You won't be able to build the solution without it." } $path = &"$vsWherePath" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe if ($path.Length -eq 0) { throw "No MSBuild can be found. Make sure you have Visual Studio installed." } return $path } $msBuildPath = Get-MsBuildPath $buildToPaths = @("$PSScriptRoot/docker/deploy/cm") $buildToPaths | ForEach-Object { Write-Host "[$((Get-Date).ToString("hh:mm:ss"))] Building the backend code to $_..." -ForegroundColor Yellow &$msBuildPath $solutionName "...