Trying to solve a Rust exercise for the first time on this (Windows) machine, I am running into the following error.
PS > cargo test
error: linker `link.exe` not found
= note: program not found
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
note: VS Code is a different product, and is not sufficient.
You shouldn’t need to install VS, but just the build tools. However, you may need a (free) MS account to download and install the build tools, and the VS Installer needs to be installed. You might be tempted to delete the installer after installing the build tools, but the build tools get updated fairly frequently, so if you want to keep them up-to-date, you may want to keep the VS installer around for that.
Then you can use vscode. Not sure about other IDEs.
When I first bring up VS Installer it shows I have Visual Studio Build Tools installed for both 2019 (v 16.11.23) and 2017 (15.9.51). Not sure if the 2017 is still needed, but I think it was when I first started using Rust a few years ago.