vscode-rust
vscode-rust copied to clipboard
Unable to run `cargo clean` while VS Code is open
Running cargo clean while VS Code was open (with a Rust project), I got the following error:
$ cargo clean
error: could not remove build directory
Caused by:
failed to remove file `<path to my project>\target\rls\debug\deps\serde_derive-7eec45f9b1b97ee6.dll`
Caused by:
Access is denied. (os error 5)
I tried this several times, and every time access was denied. I closed VS Code and ran cargo clean again, and it worked immediately. Maybe the rls-vscode plugin is holding onto some files, preventing cargo clean from removing them?
VS Code Info Version: 1.37.0-insider (user setup) Commit: 6d82826e990407364d5c829b73602a19ecdf7d00 Date: 2019-07-26T05:37:26.606Z Electron: 4.2.7 Chrome: 69.0.3497.128 Node.js: 10.11.0 V8: 6.9.427.31-electron.0 OS: Windows_NT x64 10.0.16299