Vs-preclean-vs.exe
| Condition | Verdict |
|-----------|---------|
| Located in Program Files\Microsoft Visual Studio | ✅ Safe |
| Digitally signed by Microsoft | ✅ Safe |
| Runs only during build (Task Manager shows high CPU briefly) | ✅ Normal |
| Runs constantly, consumes >20% CPU while IDE closed | ⚠️ Investigate |
| Located in AppData or Temp | ❌ Likely malware |
| No digital signature | ❌ Extremely suspicious |
If you need more granular control over what vs-preclean-vs.exe deletes, consider customizing your .vcxproj file with custom BeforeClean or AfterClean targets in MSBuild.
The executable is invoked by the Visual Studio build engine (MSBuild or the VC compiler frontend). It runs under the following scenarios:
Running manually may show:
vs-preclean-vs.exe [project_file] [options]
But Microsoft does not document it for direct use — parameters may change without notice.
In most cases, yes – it is safe. It is signed by Microsoft Corporation. To verify:
However, malware authors sometimes name their malicious executables to mimic legitimate Microsoft processes. If you notice any of the following, your system may be infected: vs-preclean-vs.exe
If you suspect malware, upload the file to VirusTotal or scan with Windows Defender, Malwarebytes, or another reputable AV.
If Visual Studio complains that it cannot find vs-preclean-vs.exe, your installation is likely corrupt. Run the Visual Studio Installer → More → Repair.
Problem: "vs-preclean-vs.exe has stopped working." | Condition | Verdict | |-----------|---------| | Located
Problem: The file runs every time I start my PC.
While you cannot entirely disable it without breaking the build system, you can minimize its impact:
Alternatively, if you only need to compile without precleaning (e.g., for a one-off script), invoke the compiler directly (cl.exe, link.exe) instead of MSBuild. The executable is invoked by the Visual Studio