In this post, we will show you how to fix the “Failed to load xgameruntime.dll” error, with error code 126. This is a system-level DLL loading issue that typically occurs when launching certain games or game-related applications, especially those tied to the Microsoft Store or Xbox services.
The error indicates that Windows was unable to load the xgameruntime.dll file, which is a Dynamic Link Library (DLL) associated with the Microsoft Gaming Runtime or related Xbox/Game Pass infrastructure. When the error occurs, the following message appears in a pop-up and halts the game or app from running:
Failed to Load xgameruntime.dll
Error Code 126
What causes the ‘Failed to load xgameruntime.dll’ error
The error has several underlying causes. It is often triggered after a recent Windows update, which may corrupt or unregister essential runtime files. Another frequent cause is security software, such as Windows Defender or third-party antivirus programs, which may mistakenly quarantine or block the DLL if it is part of a cracked or modded game setup. Apart from that, some users face this issue due to missing or misconfigured Microsoft Gaming Services, which is a core dependency for many modern games in Windows 11/10.
Fix Failed to load xgameruntime.dll Error Code 126
To fix the “Failed to load xgameruntime.dll” error on your Windows 11/10 PC, use these solutions:
- Reset or reinstall Gaming Services
- Temporarily disable security software
- Repair or reinstall the affected game/app
- Update graphics drivers and Windows
- Run System File Checker (SFC) and DISM
Let us see this in detail.
1] Reset or reinstall Gaming Services
Microsoft Gaming Services package is a critical runtime framework for Xbox, Game Pass, and some Store-based games. If it is missing, corrupted, or not registered correctly, Windows fails to load the DLL and shows Error Code 126.
To reset or repair Gaming Services, open the Settings app (Win + I) and select Apps > Installed apps. Scroll down to locate Gaming Services and click the three dots next to it. Select Advanced options.
On the next screen, scroll down and click Repair. This will try to repair the app without affecting its data. See if the error is gone. If not, try the Reset option.
If the error continues to appear, try uninstalling and then reinstalling the app. Go to the same app Settings page, click Uninstall, and follow the prompts.
If that doesn’t work (due to system protection), try the PowerShell method:
Right-click Start > Windows PowerShell (Admin). Run the following commands one at a time:
get-appxpackage Microsoft.GamingServices get-appxpackage Microsoft.GamingServices | remove-AppxPackage -allusers start ms-windows-store://pdp/?productid=9MWPM2CQNLHN
After the Microsoft Store opens to the Gaming Services page, click Get. This reinstalls the Gaming Services framework and restores the missing or broken DLLs.
2] Temporarily disable security software
Sometimes, your antivirus or Windows Defender may mistakenly flag essential game files as threats and either quarantine or block them. This can trigger the “Failed to load xgameruntime.dll” error when launching a game.
To rule this out, temporarily disable real-time protection in your antivirus software. The location of this setting may vary depending on the antivirus you’re using. For example, in Microsoft Defender, it’s found under Virus & threat protection settings; in Avast, it’s under Core Shields, and so on.
After disabling real-time protection, try re-extracting or reinstalling the game files so that any previously blocked components, including DLLs, can be restored properly.
If the issue is resolved, make sure to re-enable real-time protection and add the game’s installation folder to the antivirus Exclusions list to prevent future interference.
3] Repair or reinstall the affected game/app
If the error occurs with only one specific game or app, the issue likely lies within that game’s local files rather than the system itself. In such cases, your first step should be to verify the integrity of the game files. Most game launchers offer this feature. It checks your local game files against the official files on the server and replaces any missing, outdated, or corrupted files with clean copies.
If verifying the files doesn’t fix the issue, uninstall and reinstall the game to ensure a clean copy of all necessary files and runtime components is installed.
4] Update graphics drivers and Windows
Outdated drivers or missing system updates can prevent DLLs from loading correctly, especially if the game relies on newer DirectX or GPU features. Updating your graphics drivers and Windows helps avoid such conflicts and ensures smoother game performance.
5] Run System File Checker (SFC) and DISM
Also, try running the System File Checker (SFC) and DISM tools. These tools help detect and repair corrupted or missing system files that could be interfering with game runtime components.
I hope this helps.
Read: Fix LowLevelFatalError while gaming on Windows PC.
How do I manually fix DLL errors?
To fix DLL errors, start by restarting your PC and checking if the DLL file exists in the application or system folders. If it’s missing or corrupted, reinstall the program that uses it, or run System File Checker (SFC) and DISM to repair system files. You can also try updating Windows and relevant drivers. Avoid downloading DLLs from third-party sites, as they may be unsafe.
How to fix schedule 1 error code 126?
If you’re encountering Error Code 126 when trying to launch Schedule 1, it means that the game is failing to load a required DLL module. This is a common Windows error indicating that a runtime component or dependency is either missing, corrupted, or blocked. To fix it, restart your PC, run the game as administrator, verify game files on Steam, or repair or reset Gaming Services.
Read Next: Error 0x87e00002 when transferring a Game on PC.