Msvcr90.dll not found

Rust was working fine last night. This morning I'm getting this:

"The code execution cannot proceed because MSVCR90.dll was not found. Reinstalling the program may fix this problem."

C:\>rustup show
Default host: x86_64-pc-windows-msvc

installed toolchains
--------------------

stable-i686-pc-windows-msvc
stable-x86_64-pc-windows-msvc
nightly-i686-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

nightly-i686-pc-windows-msvc (default)
rustc 1.26.0-nightly (bedbad611 2018-02-26)

I switched to 32-bit stable and I'm getting the same error there.

64-bit stable is getting a link error, so not helpful in diagnosing this problem.

This sounds a lot like a windows problem. From memory msvcr*.dll stands for the MicroSoft Visual C Runtime, if the linker isn't able to find the DLL maybe something has changed with your $PATH to alter the directories it'll search?

When you installed Visual Studio it should have also added a "Developer Command Prompt" which is essentially just cmd with the correct environment variables set. You may want to see what happens when you try to compile your project in that.

There's also a question on StackOverflow where someone encountered the exact same error opening MS Excel.

Msvcr90.dll is required by programs compiled with Microsoft Visual C++ 2008.

I'm surprised that it's required by anything Rust-related, because Rust doesn't work with that version of MSVC (it requires MSVC 2013 or later).

That's very weird. After an unplanned reboot today, my rust executables are running again. Maybe a dll injection gone bad.

Sounds like you might want to check your computer for malware!

It's not malware, but this computer does have some stability problems I haven't been able to pin down yet. I've run cpu and memory tests and swapped out the motherboard. Beginning to suspect a bad install of Windows 10.

Royce Mitchell, IT Consultant
ITAS Solutions

royce3@itas-solutions.com

FYI to those out there, I ran into this again today, on a different computer. Reboot didn't help. Had to completely uninstall and reinstall rust to fix the problem. The executable that was looking for the dll was build-script-build.exe, which is apparently an intermediate file in the build system?

Just in case anyone encounters this problem:

I fixed it by deleting the target directory, and re-running cargo.