The Failed to load xgameruntime.dll Code 126 error can prevent a game from launching, but it does not automatically mean that Windows needs to be reinstalled. Start with a restart and Windows updates, then repair the affected game or Xbox app. If the issue continues, check Gaming Services, run DISM and SFC, and reinstall the affected application only when necessary.
The key is to identify whether the problem affects one game or multiple applications. A single-game issue often points toward its installation or dependencies, while errors across several Xbox games may indicate a shared gaming component problem.
Let’s learn how to fix the xgameruntime.dll Code 126 error step by step.
Fix: Failed to Load xgameruntime.dll Code 126

To fix the Failed to load xgameruntime.dll Code 126 error on Windows 11 or Windows 10, follow these steps:
- To start troubleshooting, restart your PC and install available Windows updates.
- To repair the affected game, open Settings > Apps > Installed apps, select the game, and choose Advanced options > Repair, if available.
- To repair the Xbox app, open its advanced options and select Repair or Reset if necessary.
- To update gaming components, open Microsoft Store and install available updates for the Xbox app and related components.
- To check Windows system files, run DISM and SFC from an administrator Command Prompt or Terminal.
- To address Gaming Services problems, repair the component through Windows settings or reinstall it using Microsoft’s recommended troubleshooting procedure.
- To finish, restart your computer and launch the game again to check whether the error is resolved.
Step 1: Restart Your PC and Update Windows
Before changing system settings, restart your computer. A restart can clear temporary errors, finish pending installations, and allow Windows gaming components to load correctly. If the error appeared after installing a game update or Windows update, this simple step is worth trying first.
Save your work, close open applications, and select Start > Power > Restart. After Windows starts again, launch the game or Xbox app that produced the error.
If the problem continues, check for Windows updates. Open Settings > Windows Update in Windows 11 or Settings > Update & Security > Windows Update in Windows 10. Select Check for updates and install applicable updates. Restart your PC if Windows requests it.
Keeping Windows current can resolve compatibility issues involving gaming components and system libraries. However, installing updates does not guarantee a fix if the underlying problem is a damaged Gaming Services installation or a missing dependency.
Step 2: Repair the Game or Application
If the error appears only when you launch one particular game, start by repairing that application. Windows provides repair options for many applications, allowing you to fix certain installation problems without uninstalling the entire program.
Open Settings > Apps > Installed apps in Windows 11. In Windows 10, go to Settings > Apps > Apps & features. Find the affected game, select its menu or entry, and look for Advanced options. If the option is available, select Repair and wait for Windows to finish.
The navigation path is Settings > Apps > Installed apps > Your game > Advanced options > Repair.
Not every game provides this option. If you installed the game through a platform such as Steam, open that platform and use its game-file verification feature instead. On Steam, this is generally available through Library > Right-click the game > Properties > Installed Files > Verify integrity of game files.
This process checks the installed game files and replaces damaged or missing files when necessary. Once the repair or verification finishes, restart the game and see whether the xgameruntime.dll error disappears.
Step 3: Repair or Reset the Xbox App
The Xbox app works with several Windows gaming components, so a problem with the app may prevent some games from launching correctly. Repairing it is a useful next step, especially if the error appears when launching games installed through the Xbox app or PC Game Pass.
Open Settings > Apps > Installed apps in Windows 11, or Settings > Apps > Apps & features in Windows 10. Search for Xbox, select the app, and open Advanced options if available.
Choose Repair first. This attempts to fix the application without deleting its data. If the error continues, return to the same screen and select Reset, if available.
Follow this path: Settings > Apps > Installed apps > Xbox > Advanced options > Repair > Reset.
Keep in mind that resetting an app can remove its local settings or sign-in information, so you may need to sign in again. It should not be your first choice if a simple repair is available.
After completing the process, restart the Xbox app and try launching your game again. If the error persists, continue to the next step.
Step 4: Update Microsoft Store and Gaming Components
Outdated or damaged gaming components can cause Windows games to fail when loading required runtime libraries. Updating the Xbox app and related components may resolve compatibility problems.
Open Microsoft Store from the Start menu. Select Library in Windows 11, or open the corresponding Library section in your version of Microsoft Store. Select Get updates or Check for updates, depending on the interface.
Follow this path: Start > Microsoft Store > Library > Get updates.
Allow available updates for the Xbox app and other relevant gaming components to finish installing. If Gaming Services appears in your installed applications, check whether Windows offers an update or repair option for it.
Once the updates are complete, restart your PC and test the affected game.
If you cannot find a particular component in Microsoft Store, do not download a replacement DLL from an unfamiliar website. The file may be incompatible, modified, or unsafe. Use Microsoft’s supported installation and repair methods instead.
Step 5: Repair Windows System Files Using DISM and SFC
If the previous methods do not work, damaged Windows system files may be contributing to the error. Windows includes two command-line tools, DISM and System File Checker (SFC), that can help identify and repair certain types of system corruption.
First, right-click the Start button and open Terminal (Admin) in Windows 11 or Windows PowerShell (Admin) in Windows 10. Approve the User Account Control prompt if it appears.
Enter the following command and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
Wait for the operation to complete. It may take several minutes, and the progress indicator can pause temporarily. Keep your computer powered on and connected to the internet if required to obtain repair files.
Next, run:
sfc /scannow
The navigation path is Start > Terminal (Admin) > Run DISM > Run SFC.
DISM checks and repairs the Windows component store, while SFC scans protected system files and attempts to replace damaged versions. These commands do not specifically repair every third-party gaming component, but they can help if Windows corruption is involved.
When both commands finish, restart your PC and test the game again. If SFC reports that it repaired files, restarting allows Windows to use the repaired files where necessary.
Step 6: Repair Gaming Services
Gaming Services is a Windows component used by certain games distributed through Microsoft’s gaming ecosystem. If its installation becomes damaged, games that depend on it may fail to launch.
Start by opening Settings > Apps > Installed apps in Windows 11 or Settings > Apps > Apps & features in Windows 10. Search for Gaming Services. If the entry provides Advanced options, try selecting Repair first.
The navigation path is Settings > Apps > Installed apps > Gaming Services > Advanced options > Repair.
If the repair option is unavailable or the problem continues, you may need to reinstall Gaming Services using Microsoft’s supported troubleshooting procedure. Before doing so, check the Xbox app and Microsoft support guidance for your Windows version. Avoid removing unrelated system packages or running commands copied from unverified websites.
Some troubleshooting procedures involve PowerShell commands that remove and reinstall Gaming Services. Because these commands can change Windows components, use only instructions appropriate to your system and verify each command before executing it.
After repairing or reinstalling Gaming Services, restart your computer, open Microsoft Store, install any relevant updates, and try launching the game again.
Step 7: Reinstall the Affected Game or Xbox App
If the error still appears, the game installation or Xbox app may be damaged beyond what the repair options can fix. Reinstalling the affected application can replace missing or corrupted application files.
Before uninstalling a game, check whether your saved progress is synchronized with cloud storage or backed up locally. Some games store saves separately, and uninstalling an application can affect local data.
Open Settings > Apps > Installed apps, locate the affected game, and select Uninstall. Restart your PC, then reinstall the game from its original trusted source, such as Microsoft Store, the Xbox app, or the game’s official launcher.
If several Xbox games experience the same error, focus on repairing the shared Xbox app and Gaming Services components before reinstalling every game. This can save time and avoid unnecessary downloads.
Step 8: Check Whether Security Software Is Blocking the Runtime
In some cases, security software may block or quarantine a legitimate gaming component. This is worth investigating if the error started after a security update or if your antivirus reports a problem involving the game’s installation folder.
Open Windows Security > Virus & threat protection > Protection history and review recent detections. If you find a relevant entry, verify that the file belongs to a legitimate game or Microsoft component before taking action.
Do not disable antivirus protection permanently or restore a suspicious DLL just to get a game running. If a detection appears to be incorrect, verify the application’s files through its official launcher and consult the security software provider’s guidance.
Once you have addressed any confirmed false detection safely, restart your PC and test the application again.
FAQs
1. What does xgameruntime.dll Code 126 mean?
Error Code 126 generally indicates that Windows could not load a required module. The DLL itself may be missing or damaged, or another dependency required by the runtime may be unavailable. The error message alone does not identify the exact cause.
2. Is xgameruntime.dll a Windows file?
It is associated with Microsoft’s gaming runtime components. Its presence and location can depend on the application and gaming components installed on your PC. Avoid downloading standalone copies from unofficial DLL websites.
3. Can I fix Code 126 without reinstalling Windows?
Yes. Start with application repair, Windows updates, Microsoft Store updates, and Gaming Services troubleshooting. DISM and SFC can also help if Windows system files are damaged. Reinstalling Windows should not be the first troubleshooting step.
4. Why does the error appear only when I launch one game?
The game may have damaged installation files, a missing dependency, or a compatibility issue. Repair or verify that game’s files first. If several games show the same error, investigate shared components such as Gaming Services.
5. Will reinstalling Gaming Services delete my games?
Reinstalling Gaming Services does not normally require uninstalling your entire game library. However, changes to gaming components can affect app behavior, so follow Microsoft’s instructions and back up important local saves before advanced troubleshooting.
6. Should I download xgameruntime.dll separately?
No. Downloading DLL files from unofficial websites can introduce malware or incompatible files. Use Microsoft Store, the Xbox app, your game’s official launcher, and Windows repair tools to restore the required components safely.