Unable to Compile, MSVC Does Not Contain the Binary



I installed Rust last night for the first time. I am using Windows 10 Pro. The install apparently worked correctly and I have added the .cargo\bin directory to my PATH variable. rustc exists in the .cargo\bin folder, as it should.

rustup update and rustup --version

rustup update:
_info: syncing channel updates for 'stable-x86_64-pc-windows-msvc’
info: checking for self-updates

stable-x86_64-pc-windows-msvc unchanged - (rustc does not exist)_

rustup version:
rustup 1.5.0 (92d0d1e9e 2017-06-24)

The error I receive when I attempt to compile:
error: toolchain ‘stable-x86_64-pc-windows-msvc’ does not have the binary rustc.exe

I am attempting to compile via navigating to the folder with the .rs file and running rustc main.rs.

I receive the error whether using Powershell, CMD, or a Visual Studio developer’s command line.

I’ve reinstalled Rust, as well as installing the Visual Studio Build Tools 2017.


Try deleting your .cargo/toolchains/stable-x86_64-pc-windows-msvc folder and then reinstalling that toolchain because it sounds like it might be corrupt.

Also check if your anti virus quarantined/deleted any files.


@retep998, I did as you suggested. Also, I have nothing in quarantine.

No change.