Skip to content

Enhance build for Windows #2434

@eransha-salvador

Description

@eransha-salvador

Several friction points when building OpenSSH on Windows with current VS releases:

  1. Start-OpenSSHBuild calls vswhere and takes the newest install it returns.
    On machines that also have VS 2026 (v145 toolset) installed alongside
    VS 2022 (v143), the downstream Select-String version checks miss, fall
    through to the VS 2015 branch, and dereference a null $env:VS140COMNTOOLS.

  2. vcpkg's CMake can pick a different toolset than the .vcxproj files
    (which hard-code v143). When a newer VS is selected, builds fail with
    MSB8040 (Spectre-mitigated libs missing for v145).

  3. OpenSSH-build.ps1 -destination defaults to $env:WORKSPACE. Outside
    CI that variable is unset, so running the script locally errors before
    it starts.

  4. README.txt lacks current Windows prerequisites: VS 2022 Desktop C++
    workload, v143 Spectre-mitigated libs, Git, the one-time vcpkg
    bootstrap/integrate step, and the need for elevated PowerShell.

All four are build-environment issues, independent of runtime behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions