param( [int]$Port = 33268 ) $ErrorActionPreference = "Stop" $repoRoot = Split-Path -Parent $PSScriptRoot Push-Location $repoRoot try { Write-Host "Building WCF capture server..." dotnet build .\tools\AVEVA.Historian.WcfCaptureServer\AVEVA.Historian.WcfCaptureServer.csproj Write-Host "" Write-Host "Starting capture server. Leave this window open." Write-Host "Endpoint: net.tcp://localhost:$Port/Hist" Write-Host "Captured Open2 metadata will print as JSON with length and SHA-256 only." Write-Host "" & .\tools\AVEVA.Historian.WcfCaptureServer\bin\Debug\net481\AVEVA.Historian.WcfCaptureServer.exe $Port } finally { Pop-Location }