How to install Vs BuildTools on D drive?

Hi there, my question may seems pretty stupid I really can not find the help. Look, I have two drives and Windows choose the C one as a main one. So I downloaded vs_BuildTools.exe form the official Microsoft website, installed it and now it is stored on Program Files (x86) least I think so. So I typed cargo build and got this message:
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 VS 2013, VS 2015, VS 2017, VS 2019 or VS 2022 was installed with the Visual C++ option

Also, rustup-init.exe showed me this message:
Rust requires the Microsoft C++ build tools for Visual Studio 2013 or
later, but they don't seem to be installed.

I don't know what am I doing wrong..... When I was installing Rust on Linux it was so much easier...

Do you have the right components added. You will need the MSVC build tools and the Windows 10 SDK. Here is a screenshot from the Visual Studio 2022 installer that shows the necessary components. Specifically look under the "optional" components to make sure you have at least these two:

1 Like

It would be funny to count beginner-s percentage started witch that error message.. 100? or 99%

1 Like

Thank you so much for your response!

If you completely uninstal Visual Studio and are willing to wait a few more hours, then the new version of rustup will offer to auto-install the necessary bits and pieces.

1 Like