Add support for Visual Studio 2026 (VS 18)
This is the Visual Studio version that supports .NET 10, so I need to use it.
But it breaks building Zed on Windows with the following error:
CMAKE = Some("cmake")
--- stderr
thread 'main' panicked at C:\Users\Redacted\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\cmake-0.1.54\src\lib.rs:970:25:
unsupported or unknown VisualStudio version: 18.0
if another version is installed consider running the appropriate vcvars script before building this crate
I do not use Rust, I just try building Zed. I am not sure if the provided information is enough, let me know if you need anything more of me.
On my machine,
VisualStudioVersion=18.0
but ...
C:\Dev\zed>msbuild -ver
MSBuild version 17.15.0-preview-25421-07+49758e5ba for .NET Framework
17.15.0.42107
So, I think VS 2026 breaks the assumption that VS version and MSBuild versions are the same.
+1. Also running into this when trying to build various aws-sdk crates that depend on cmake-rs in their *-sys dependencies.
Ugh... I'm finding this after uninstalling Visual Studio 2022. My builds fail in aws-lc-sys now because of this, we need a cmake-rs update quickly
Same issue when I tried installing Dioxus CLI.
Command:
cargo install dioxus-cli "--git=https://github.com/DioxusLabs/dioxus" --branch=main --locked
Output:
--- stderr
thread 'main' (10044) panicked at c:\rust\cargo\registry\src\mirrors.aliyun.com-XXXXXXXXXXXXXXXX\cmake-0.1.54\src\lib.rs:970:25:
unsupported or unknown VisualStudio version: 18.0
if another version is installed consider running the appropriate vcvars script before building this crate
For anyone else who ended up here after uninstalling VS2022, I found this helpful link to download VS2022 directly on Reddit. Since you can't otherwise find older VS downloads unless you have an active subscription for some reason.
https://aka.ms/vs/17/release/vs_community.exe