r/learnrust • • 23d ago

Windows 11 Smart App Control keeps blocking Cargo build scripts. How do you deal with this?

Post image

Hi everyone!

I'm developing a Rust application on Windows 11, and I keep running into an issue with Windows Smart App Control whenever I use cargo build.

Windows shows this warning:

"Part of this app has been blocked. Some features of cargo.exe may not work because we can't confirm who published build-script-build.exe."

Sometimes I can successfully build my application, but after changing my code and rebuilding, Windows blocks it again.

I've tried running cargo clean and rebuilding. Sometimes that works temporarily, but the problem keeps coming back.

Has anyone experienced this issue? Is there a way to make Windows trust locally compiled Rust executables without disabling Smart App Control entirely?

Thank you

8 Upvotes

Duplicates