Runtime Error Repair: A Complete Windows Troubleshooting Guide
Identify and repair supported Microsoft Visual C++, .NET, Windows App Runtime, DirectX, and application runtime failures—using the error evidence instead of replacing files at random.
What a runtime error actually means
A runtime supplies shared code that applications use while they execute. Windows applications may depend on Microsoft Visual C++ libraries, .NET or .NET Framework, the Universal C Runtime, DirectX components, Windows App Runtime, or prerequisites installed by the application itself. A failure can occur even when the named file exists: its version or processor architecture may be wrong, a dependent component may be missing, or the application may be loading an unintended copy.
| Message or symptom | Likely category | Best first action |
|---|---|---|
VCRUNTIME140.dll, MSVCP140.dll, or api-ms-win-crt-*.dll | Visual C++ / Universal CRT | Repair the application and the official supported Visual C++ packages it requires. |
0xc000007b or “invalid image format” | Architecture mismatch or damaged dependency | Confirm x86 versus x64, then repair the application and its official prerequisites. |
| “Side-by-side configuration is incorrect” | Side-by-side assembly or manifest | Use Event Viewer or sxstrace to identify the missing assembly before reinstalling it. |
| “.NET application failed to start” or CLR initialization error | .NET runtime / framework | Determine the exact .NET family and version required by the publisher. |
d3dx9_43.dll, xinput1_3.dll, or game launch failure | Legacy DirectX side-by-side component | Run the game’s official prerequisite installer or Microsoft’s legacy DirectX runtime. |
| Only one program fails after an update | Application files, add-in, settings, or compatibility | Repair or reinstall that program before changing Windows-wide components. |
Record the evidence before repairing
- Capture the complete error text, filename, numeric code, and application name.
- Note whether the error began after an app, driver, Windows, or security update.
- Test whether one application fails or several unrelated applications fail.
- Confirm whether Windows and the affected program are 32-bit or 64-bit.
- Check Reliability Monitor for the faulting application and module.
- Check the Application log in Event Viewer at the exact failure time.
Press Win + R, enter perfmon /rel, and open the failure in Reliability Monitor. For deeper detail, open Event Viewer and inspect Windows Logs → Application. The “faulting module,” exception code, activation context, or .NET Runtime entry often determines the next safe step.
Identify the runtime owner
Start with application scope
If only one program fails, repair or reinstall that program from its official installer. Its setup program knows which private files, services, add-ins, and prerequisites belong together.
Map filenames to a runtime family
VCRUNTIME,MSVCP, and manyapi-ms-win-crterrors point toward Visual C++ or UCRT. CLR, hostfxr, or framework-version messages point toward .NET. Direct3D, XAudio, XInput, and D3DX names point toward DirectX or game prerequisites.Confirm processor architecture
A 32-bit program normally needs x86 dependencies even on 64-bit Windows. Do not replace an x86 file with an x64 copy or vice versa. The application publisher’s system requirements are authoritative.
Use Windows evidence
Correlate the time of the crash across Reliability Monitor and Event Viewer. A repeated faulting module is a useful lead; it is not automatic proof that the module itself is defective.
Safe runtime repair path
Restart and install pending supported updates
Restart Windows fully. Install pending Windows and application updates, then restart again. A servicing operation or application update may already contain the correct component.
Repair the affected application
Open Settings → Apps → Installed apps, select the program, and use Repair or Modify if offered. Otherwise reinstall it from the official publisher. Preserve licenses, profiles, and user data first.
Repair the required official runtime
Use the publisher’s documented prerequisite. Do not remove all runtime versions indiscriminately: applications can depend on different side-by-side releases.
Repair Windows components when failures are system-wide
Open Windows Terminal or Command Prompt as administrator and run DISM, followed by SFC.
DISM.exe /Online /Cleanup-Image /RestoreHealthsfc /scannowRestart and test the same reproducible action.
Isolate conflicts
If the error continues, test without nonessential add-ins and overlays. A clean boot can identify a third-party service conflict, but restore normal startup afterward.
Repair Visual C++ Redistributables correctly
Visual C++ applications are built against specific runtime toolsets. The current supported Visual C++ v14 Redistributable services many applications built with Visual Studio 2015 and later, while older software may require an older side-by-side package. The application vendor should specify what it needs.
- Download packages only from Microsoft or the application’s verified installer.
- On 64-bit Windows, install x86 when the affected application is 32-bit; install x64 for a 64-bit application. Some systems legitimately need both.
- Use the package’s Repair option first when available.
- Restart before retesting a repeatable failure.
- Do not uninstall unrelated Visual C++ entries merely because they look duplicated.
Repair .NET and .NET Framework failures
Modern .NET and Windows .NET Framework are related but serviced differently. First read the application’s requirements. A modern application may require a particular .NET Desktop Runtime, while a legacy Windows application may depend on a Windows feature such as .NET Framework 3.5.
- Check the exact runtime/version named by the application or event log.
- For modern .NET, use Microsoft’s official .NET download and select the Desktop Runtime, Runtime, or Hosting Bundle only as documented.
- For .NET Framework included with Windows, use Windows Features and Windows Update rather than downloading random framework files.
- Repair or reinstall the affected application after the correct runtime is present.
- If several Windows components fail, run DISM and SFC as shown above.
Diagnose side-by-side configuration errors
Windows side-by-side activation uses application manifests to select a compatible assembly. Event Viewer commonly names the missing or conflicting assembly. For a trace, open an elevated Command Prompt:
Start the failing application once, return to the prompt, press Enter, then parse the trace:
Open the resulting text file and use the named assembly and architecture to repair the corresponding official package. A trace can contain paths and system details; review it before sharing.
DirectX and game runtime errors
Windows 10 and 11 include modern DirectX components, but some older games require optional legacy side-by-side libraries. This does not mean DirectX itself should be downgraded.
- Verify or repair game files in the official launcher.
- Run the game’s prerequisite installer, commonly found in a redist or installer folder.
- Use Microsoft’s official DirectX End-User Runtime only when the publisher requires legacy components.
- Update the graphics driver from Windows Update or the hardware manufacturer.
- Temporarily disable nonessential overlays and injectors for testing.
- Review the game log and Windows crash entry for the actual faulting module.
Advanced checks when the error persists
Clean boot
A clean boot starts Windows with Microsoft services and a limited startup set. If the problem disappears, re-enable groups of services until the conflict returns. Record the original configuration and restore normal startup after testing.
Security quarantine
Check Windows Security protection history or the approved enterprise security console. Restore a quarantined file only when its publisher, signature, and source are verified; otherwise reinstall the affected program from its official source.
New user profile
If the application works in a new local profile, the runtime may be healthy while the original profile contains damaged per-user settings, cache data, or add-ins.
Storage and memory
Repeated corruption across unrelated software can indicate storage, memory, or stability problems. Back up important data, review drive health, and use Windows Memory Diagnostic or hardware-vendor diagnostics.
When to use an in-place Windows repair
Consider an in-place repair only after multiple Windows applications fail, DISM and SFC cannot restore system health, and malware or hardware failure have been reasonably excluded. Back up data, confirm sufficient free space, suspend drive encryption protection if your documented procedure requires it, and use installation media matching the installed Windows edition and language.
Reduce future runtime failures
- Keep Windows and applications on supported versions.
- Use official installers and preserve their prerequisite packages.
- Avoid registry cleaners and standalone DLL replacement sites.
- Do not delete Visual C++ or .NET entries solely to “clean up” the Apps list.
- Create a restore point or backup before major application, driver, or system changes.
- Keep enough free disk space for Windows servicing and application updates.
Runtime error decision table
| What you observe | Most useful next step | Avoid |
|---|---|---|
| One application fails | Repair/reinstall that application and its documented prerequisites. | Replacing Windows DLLs manually. |
| VCRUNTIME or MSVCP filename | Repair the correct official Visual C++ package and architecture. | Removing every Visual C++ version. |
| Side-by-side configuration error | Read Event Viewer or an sxstrace report. | Guessing which package is missing. |
| CLR or .NET host failure | Confirm the app’s targeted .NET family and install/repair it officially. | Assuming the newest version replaces all older requirements. |
| Several unrelated Windows apps fail | Run DISM, SFC, updates, and hardware/security checks. | Reinstalling each app before checking Windows health. |
Frequently asked questions
What causes a Microsoft Visual C++ runtime error?
Possible causes include damaged application files, a missing or incompatible redistributable, mixed architectures, an add-in conflict, corrupted Windows components, or a defect in the application. The exact message and crash evidence determine which is most likely.
Should I install both x86 and x64 Visual C++ packages?
Often yes on 64-bit Windows because 32-bit applications require x86 components and 64-bit applications require x64 components. Install only supported packages from Microsoft or the verified application installer.
Does DirectX 12 contain every older game runtime file?
No. Some older games require optional legacy side-by-side components. Use the game’s prerequisite installer or Microsoft’s official legacy DirectX runtime package.
Will SFC fix all runtime errors?
No. SFC repairs protected Windows system files. It will not normally repair third-party application files, every Visual C++ package, a missing modern .NET Desktop Runtime, or an application defect.
Is error 0xc000007b always a missing DLL?
No. It often indicates an invalid image format or x86/x64 mismatch, but damaged application files, runtime components, drivers, or Windows files can also contribute.
References and further reading
- Microsoft Learn: Latest supported Visual C++ Redistributable downloads
- Microsoft .NET downloads
- Microsoft Support: Use DISM and System File Checker
- Microsoft Learn: Using Sxstrace.exe
- Microsoft Download Center: DirectX End-User Runtime Web Installer
- Microsoft Support: How to perform a clean boot in Windows