Failed to Load xgameruntime.dll Error Code 126 in Windows 10/11

What is xgameruntime, and how to fix xgameruntime.dll error code 126 in Among US, Dungeons, or Dirt 5?

Page Table of Contents

Dawn Tang

Updated on Jun 11, 2025

0 Views | 0 min read

Quick Steps:

  • Repair Gaming Services.
  • If that fails, PowerShell + reinstall.
  • Run sfc /scannow.
  • Download the latest xgameruntime.dll.
  • Update Windows & drivers.
  • Reinstall or verify the app/game.
  • Try regsvr32 if other methods fail.
  • Whitelist the antivirus for a try.

8 Fixes for the "Failed to Load xgameruntime.dll Error Code 126"

Method

Purpose

Why it works

Repair Gaming Services

Restore core DLLs

Fixes corruption

Reinstall via PowerShell & Store

Full refresh of Gaming Services

Removes broken installs

Run sfc /scannow

Fix Windows system files

Repair damaged system DLLs

Download the DLL file Regain the DDL file Recover missing DLLs

Update drivers & OS

Fix dependency mismatches & runtime bugs

Removes runtime 126 errors

Reinstall/verify the app

Ensure the bundle DLL is present

Restores missing files

regsvr32 (if applicable)

Register the DLL in the registry

Useful for COM-based issues

Whitelist the antivirus app Add the game/app folder to antivirus exclusions Prevents false positives from deleting DLLs

What Does xgameruntime.dll Error Code 126 Mean?

When you open your Windows 10 and 11 and try to launch your games like Among US, No Man's Sky, Flight Simulator, or Dungeons, instead of loading into the game, you get the message "Failed to load xgameruntime.dll. Error code: 126." What does it mean?

failed-to-load-xgameruntime-dll-error-code-126-example.jpg

The error code 126 often occurs when Windows fails to find or load the xgameruntime.dll file, an essential file for games using Microsoft Gaming Runtime. This is due to issues related to DLLs, such as a missing DLL file, corrupted game files, outdated drivers, antivirus software, or even a system failure.

Fix 1: Repair or Rest Gaming Service

The xgameruntime.dll is part of Microsoft's Gaming Services/Xbox infrastructure. If that service is corrupted, the DLL won't load. You can also repair or reset the damaged files with the tool.

Step 1. Go to Settings (Hotkey: Windows+I) > Apps > Installed Apps > Gaming Services (On Windows 11: Apps & features > Gaming Services.)

failed-to-load-xgameruntime-dll-error-code-126-gaming-service-2.jpg

Step 2. Tap three dots on the side, and click "Advanced Options."

failed-to-load-xgameruntime-dll-error-code-126-gaming-service-3.jpg

Step 3. Scroll down and tap "Repair."

Step 4. If it doesn't work, reset it.

failed-to-load-xgameruntime-dll-error-code-126-gaming-service-4.jpg

Fix 2: Reinstall Game Service via PowerShell

This completely refreshes the Gaming Services app and its dependencies (including the DLL), eliminating corruption issues.

Step 1. Type PowerShell in the search window and open PowerShell as an administrator.

failed-to-load-xgameruntime-dll-error-code-126-powershell-1.jpg

Step 2. Enter the following commands one by one and hit Enter.

get-appxpackage Microsoft.GamingServices

get-appxpackage Microsoft.GamingServices | remove-AppxPackage -allusers

start ms-windows-store://pdp/?productid=9MWPM2CQNLHN

failed-to-load-xgameruntime-dll-error-code-126-powershell-2.jpg

Step 3. The Gaming Services will open in the Microsoft Store, log in to the store, and download it.

failed-to-load-xgameruntime-dll-error-code-126-powershell-3.jpg

Step 4. Install the latest Microsoft DirectX.

failed-to-load-xgameruntime-dll-error-code-126-powershell-4.jpg

Step 5. Then, restart the system and open the game.

Fix 3: Use System File Checker (SFC)

System File Checker (SFC) is a Windows utility that scans and repairs missing or damaged system files—including DLLs in C:\Windows\System32—restoring xgameruntime.dll if it's corrupted.

Step 1. Open your command prompt as an admin.

Step 2. Run sfc /scannow.

Fix 4: Download the DLL File

The xgameruntime.dll file might be missing or corrupted and cannot be repaired. In such a case, you can download and install the latest version of the DLL file from a trusted source to fix the issue.

Step 1. Visit https://www.dll-files.com/xgameruntime.dll.html on Google, and you'll see the file on dll-files.com.

failed-to-load-xgameruntime-dll-error-code-126-website-1.jpg

Step 2. Download the file, extract it, and copy the file to your C drive > Windows > System32.

Step 3. Restart the system.

Fix 5: Update Graphics Drivers & Windows

Error 126 can occur due to dependencies missing from out-of-date runtime components or driver issues. Updating outdated graphics drivers from the manufacturer's website might be helpful.

Step 1. Check which graphics driver you are using on your PC:

Right-click the Windows start button and choose "Device Manager."

failed-to-load-xgameruntime-dll-error-code-126-graphics-driver-1.jpg

Expand "Display adapters" and right-click it to select "Properties."

failed-to-load-xgameruntime-dll-error-code-126-graphics-driver-2.jpg

Under the Driver tab, check the details.

failed-to-load-xgameruntime-dll-error-code-126-graphics-driver-3.jpg

Step 2. Visit the GPU manufacturer's site and download the latest drivers.

failed-to-load-xgameruntime-dll-error-code-126-graphics-driver-4.jpg

Step 3. Go to Settings > Windows Update and ensure you are using the latest Windows version.

failed-to-load-xgameruntime-dll-error-code-126-graphics-driver-5.jpg

Fix 6: Reinstall or Repair the Affected App/Game

Some apps bundle critical files like xgameruntime.dll locally within their installation folder—not in Windows system directories. Uninstalling and reinstalling ensures that all original files are restored.

Step 1. Restart your PC and open Steam.

Step 2. Right-click the affected game and select "Properties."

Step 3. Go to Local Files and click Verify integrity of game files....

Step 4. Relaunch the game if the error is solved.

Then, you can reinstall the game manually.

Step 1. Open Control Panel > Programs & Features, or use the platform's uninstall feature.

Step 2. Uninstall the affected game or app.

Step 3. Optionally delete the installation folder to ensure a clean start.

Step 4. Reinstall via installer, CD, download, or the app store.

Step 5. Launch the app/game and confirm the error is fixed.

Fix 7: Manually Register the DLL

Registers it in the system registry. However, xgameruntime.dll isn't a classic COM object, so this often doesn't apply—but Windows might need the correct registry mapping.

Use the command:

regsvr32 xgameruntime.dll

Fix 8: Whitelist Antivirus

Sometimes, antivirus tools mistakenly quarantine DLLs during installation or launch processes. This can be a hidden cause behind missing files. If reinstalling doesn't help, try:

Temporarily Disable Real-Time Protection

Step 1. Open Start and search Windows Security.

Step 2. Go to Virus & threat protection > Manage settings.

failed-to-load-xgameruntime-dll-error-code-126-disable-real-time-protection-2.jpg

Notice:
  • If you have Tamper Protection on, disable that first (found in the same settings) to allow this change.
  • Real-time protection will automatically re-enable after a short time or upon system restart. That's why you should reinstall immediately after turning it off.

Step 3. Toggle off the real-time protection.

failed-to-load-xgameruntime-dll-error-code-126-disable-real-time-protection-3.jpg

Restore Quarantined Files

If Defender quarantined xgameruntime.dll:

Step 1. Open the command prompt as an admin.

Step 2. Go to Defender's folder:

cd "%ProgramFiles%\Windows Defender"

Step 3. List quarantined items:

MpCmdRun.exe -restore -listall

Step 4. Restore the DLL using its threat name or filename.

MpCmdRun.exe -restore -name "ThreatName"

Or specify path:

MpCmdRun.exe -restore -name "ThreatName" -Path C:\RestoreFolder

Add Game Folder to Antivirus Exclusions

Step 1. Open Windows Security > Virus & threat protection > Manage settings> scroll to Exclusions and click Add or remove exclusions.

failed-to-load-xgameruntime-dll-error-code-126-whitelist-app.jpg

Step 2. Click Add an exclusion > choose Folder > select your game/app installation folder.

Step 3. Confirm, so Defender will ignore that folder in future scans.

Sharing is caring!

Real-Time Voice Changer for 1000+ Games

If you are looking for a reliable, natural, and realistic voice changer for PC, you must not miss out on EaseUS VoiceWave, an RVC voice changer that works with 1000+ online games and 1000+ messaging apps. With 300+ AI voices and 300+ soundboards, you can find any voice you want, female, kid, male, anime girl, Bluudud, and more.

songbird-serenade-ai-voice-model-easeus-2.jpg

Key Features

  • Change your voice into celebrities, anime, and different genders.
  • Real-time voice changer backed by AI.
  • Voice adjustment gadgets.
  • Work on audio and video.

Wrapping up

This article lists possible causes and solutions for the "Failed to load xgameruntime.dll. Error code 126" issue. To fix it, you can try reinstalling Gaming Services or the affected game, downloading the required xgameruntime.dll file, updating your graphics drivers, or whitelisting the game in your antivirus settings.

If you're looking to enhance your gaming experience further, EaseUS VoiceWave is a great addition. It offers natural and authentic voice conversion with minimal delay—perfect for real-time voice changing during gameplay.

EaseUS VoiceWave

One-click to sparkle your voice!

Change Voice Now

Our Team

  • Sofia Albert

    Sofia has been involved with tech ever since she joined the EaseUS editor team in March 2011 and now she is a senior website editor. She is good at solving various issues, such as video downloading and recording.…
    Read full bio
  • Alin

    Alin is a sophisticated editor for EaseUS in tech blog writing. She is proficient in writing articles related to screen recording, voice changing, and PDF file editing. She also wrote blogs about data recovery, disk partitioning, data backup, etc.…
    Read full bio
  • Jean

    Jean has been working as a professional website editor for quite a long time. Her articles focus on topics of computer backup, data security tips, data recovery, and disk partitioning. Also, she writes many guides and tutorials on PC hardware & software troubleshooting. She keeps two lovely parrots and likes making vlogs of pets. With experience in video recording and video editing, she starts writing blogs on multimedia topics now.…
    Read full bio
  • Gorilla

    Gorilla joined EaseUS in 2022. As a smartphone lover, she stays on top of Android unlocking skills and iOS troubleshooting tips. In addition, she also devotes herself to data recovery and transfer issues.…
    Read full bio
  • Rel

    Rel has always maintained a strong curiosity about the computer field and is committed to the research of the most efficient and practical computer problem solutions.…
    Read full bio
  • Dawn Tang

    Dawn Tang is a seasoned professional with a year-long record of crafting informative Backup & Recovery articles. Currently, she's channeling her expertise into the world of video editing software, embodying adaptability and a passion for mastering new digital domains.…
    Read full bio
  • Sasha

    Sasha is a girl who enjoys researching various electronic products and is dedicated to helping readers solve a wide range of technology-related issues. On EaseUS, she excels at providing readers with concise solutions in audio and video editing.…
    Read full bio