The file or directory is corrupted and unreadable.

rohollah shahnazari 0 Reputation points
2025-06-04T06:08:37.76+00:00

Failed to execute command: ""C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\CL.exe" @C:\Users\Rohi\AppData\Local\Temp\MSBuildTemp\tmpf0e7a1f542fd49198d5f713dc7888c8c.rsp". The file or directory is corrupted and unreadable.

Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Varsha Dundigalla(INFOSYS LIMITED) 3,725 Reputation points Microsoft External Staff
    2025-11-14T13:30:31.8033333+00:00

    Thank you for reaching out.

    Visual Studio build fails with: The file or directory is corrupted and unreadable. Failed to execute command: "CL.exe @<Temp>\MSBuildTemp*.rsp"

    The .rsp file in %LOCALAPPDATA%\Temp\MSBuildTemp is unreadable due to disk or NTFS corruption.

    Fix steps:

    1. Close VS, delete Temp\MSBuildTemp folder, retry build.
    2. Run chkdsk C: /f (or affected drive), reboot.
    3. Repair system files:
         DISM /Online /Cleanup-Image /RestoreHealth
         sfc /scannow
      
    4. Optionally set a clean Temp path:
         setx TEMP C:\TempClean
         setx TMP C:\TempClean
      
    5. If corruption persists, check disk health and run VS Repair.

    Please let us know if you require any further assistance, we’re happy to help.

    If you found this information useful, kindly mark this as "Accept Answer".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.