If you are looking for solutions to the “failed to load xgameruntime.dll error code 126” issue, you’ve come to the right place. This MiniTool guide focuses on this error message and offers a couple of useful methods to resolve it.

Failed to Load xgameruntime.dll Error Code 126

When you try to launch certain games, you may encounter an error saying that xgameruntime.dll cannot be loaded. The full message is: Failed to load xgameruntime.dll error code 126.

This error usually means that Windows cannot find or correctly load the xgameruntime.dll file. This can be caused by a missing DLL file, a corrupted game installation, an outdated driver, and so on. This simple guide provides step-by-step solutions to help you fix this error and get your game or other software running smoothly again.

failed to load xgameruntime.dll error

How to Fix xgameruntime.dll Error Code 126

Fix 1. Repair or Reset Gaming Services

The xgameruntime.dll file is installed by Gaming Services. If this service is damaged or not registered correctly, Windows cannot load the DLL file, thus triggering the error code 126. So, when you receive this error, the first fix is to repair or reset the Gaming Services app from Windows Settings.

Step 1. Press the Windows + I key combination to open Settings.

Step 2. Select Apps.

Step 3. Scroll down the app list and find Gaming Services. Click it and choose Advanced options.

Step 4. In the new window, click Repair to repair the Gaming Services app. If the error code 126 persists, click Reset to reset the app.

repair or reset Gaming Services
Fresh Guide to Fixing Stellar Blade Out of Video Memory Error
Fresh Guide to Fixing Stellar Blade Out of Video Memory Error

Are you encountering the Stellar Blade out of video memory error on Windows? Read this guide to learn how to deal with it easily.

Read More

Fix 2. Uninstall and Reinstall Gaming Services

If repairing or resetting Gaming Services did not resolve the xgameruntime.dll error code 126, the next step is to completely uninstall and then reinstall it. This ensures that all corrupted files, broken registry entries, or missing components are fully removed and replaced with a new one. Follow the steps below.

Step 1. Type PowerShell in the Windows search box, and then click Run as administrator under Windows PowerShell.

Step 2. Copy and paste the following command lines one by one, and press Enter after each command:

  • get-appxpackage Microsoft.GamingServices
  • get-appxpackage Microsoft.GamingServices | remove-AppxPackage -allusers
  • start ms-windows-store://pdp/?productid=9MWPM2CQNLHN

These commands will remove the Xbox Gaming Services component from all user accounts.

Step 3. Click the Get button on the Gaming Services download page that pops up to reinstall the game service.

Step 4. Restart your computer and check if the “failed to load xgameruntime.dll” issue has been fixed.

Click to Tweet

Fresh Fixes for DOOM: The Dark Ages BUGSPLAT Error on PC
Fresh Fixes for DOOM: The Dark Ages BUGSPLAT Error on PC

Wondering how to resolve the DOOM: The Dark Ages BUGSPLAT error on your PC? Here are several useful methods to fix it.

Read More

Fix 3. Whitelist the Game Folder

Sometimes, antivirus software may block xgameruntime.dll from running, preventing the game from launching properly. To avoid this, you can try adding the game folder and other game-related services to the antivirus software whitelist or exclusion list. Here I take Windows Defender to show you the steps.

Step 1. Open Windows Settings.

Step 2. Select Update & Security > Windows Security > Virus & threat protection. Next, click Manage settings under Virus & threat protection settings.

Step 3. Scroll down the page, and then click Add or remove exclusions under Exclusions.

Step 4. Choose Add an exclusion > Folder, and then add the target game folder. After that, relaunch the game and check if the error code 126 disappears.

add the target folder to exclude it from the antivirus scan

Other Possible Fixes

In addition to the methods outlined above, there are some other potential fixes for the xgameruntime.dll error code 126.

  • Execute DISM.exe /Online /Cleanup-image /Restorehealth and sfc /scannow in Command Prompt to check for and repair corrupted system files.
  • Open Settings > Windows Update to check for and install available Windows updates.
  • Back up files and perform a clean Windows reinstallation.
Tips:
If you’ve accidentally deleted or lost game data or other files on your Windows computer, MiniTool Power Data Recovery can help. This free data recovery tool is highly recommended for retrieving a wide range of file types from hard drives, SSDs, and various other storage devices.

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

Bottom Line

How to fix the failed to load xgameruntime.dll error code 126? Repair, reset, or reinstall the Gaming Services app. In addition, adding the game folder to the antivirus exclusion list can also help.

  • linkedin
  • reddit