Hogwarts Legacy took the gaming industry by storm, and developer Avalanche Software has done a great job optimizing it for each platform. Despite that, PC users are experiencing errors and issues with the game, like a crash at startup, followed by the Visual C++ Runtime error. Here, I have compiled fixes that are confirmed to resolve the Hogwarts Legacy Visual C++ Runtime error on your Windows PC.

Working Fixes for Hogwarts Legacy Visual C++ Runtime Error

PC users report that Hogwarts Legacy keeps crashing at startup with the following error message:

The following component(s) are required to run this program:
Microsoft Visual C++ Runtime

The “Microsoft Visual C++ Runtime” error is popping up due to the upscaling tech. According to players, this issue is occurring when they select Intel XESS instead of DLSS while using an Nvidia GPU. You can fix the error by switching back to DLSS.

However, since Hogwarts Legacy is crashing at launch, you can’t switch to DLSS through the in-game menu, but there is a workaround.

Another reason the game is crashing with the Visual C++ Runtime error is that the required Microsoft Visual C++ Runtime components are missing on your PC.

The following fixes will help you switch back to DLSS and install or repair the missing or damaged Visual C++ components to fix the Hogwarts Legacy Visual C++ Runtime error on your PC.

Fix #1 – Use NVIDIA App’s Optimized Settings for Hogwarts Legacy

As stated, to fix the error, you’ll have to switch back to DLSS upscaler for your NVIDIA GPU if you have switched to XESS. Since you can’t launch the game, you can switch the upscaler through the NVIDIA App. Here is how you can switch the upscaler using the NVIDIA App:

  • Open the NVIDIA App and go to the graphics tab.
  • Click on “Hogwarts Legacy” from the list of games.
  • Now, click the “Optimize” button at the top right corner, and NVIDIA APP will force the game to use optimized settings, which also includes the switch to DLSS.
  • Launch Hogwarts Legacy, and the Visual C++ Runtime error is now fixed.
How to optimize games using the NVIDIA App?

Helpful Tip: You can also move the slider under the “Optimize” button towards “Performance” if, by default, the app doesn’t select DLSS upscaler.

Fix #2 – Delete the “GameUserSettings” File

If you have opted not to install the NVIDIA App, then you can delete the “GameUserSettings” file to fix the Visual C++ Runtime error. Deleting the file will reset all the display and graphics settings in Hogwarts Legacy, and the issue will be fixed. Here is how to delete the file:

  • Go to C/Users/”Your Username”/AppData/Local/Hogwarts Legacy/Saved/ConfigWindowsNoEditor
  • Find and delete the “GameUserSettings” file.
  • Launch Hogwarts Legacy, and it won’t crash with the Visual C++ Runtime error.
How to delete Hogwarts Legacy's "GameUserSettings" file to fix Microsoft Visual C++ Runtime error?

Fix #3 – Repair or Install Visual C++ Components

As the error message suggests, your PC doesn’t have the required Microsoft Visual C++ Components to run Hogwarts Legacy. You can fix the error by installing or repairing Visual C++ components. Here is how you can install them:

  • Go to the Steam Library and type “Steamworks” in the search bar.
  • Right-click “Steamworks Common Redistributables” > Manage > click “Browse local files”.
  • Open _CommonRedist\vcredist in the explorer window that opens on your screen.
  • You will get a list of folders with names in years starting from 2010.
  • Open each folder one by one and run the VC_redis for both x64 and x86 versions.
  • Repair or install Visual C++ Redistributables.
  • Restart your PC, launch the game, and it won’t crash on startup.
Type “Steamworks” in the Steam search bar. Right-click “Steamworks Common Redistributables” > Manage > Browse Local Files.
Install or repair the Visual C++ Redistributable.

Helpful Tip: Steam deletes installers after a certain time, and you might find some folders empty. In that case, you can manually download installers for Visual C++ Redistributables and install them. Ensure that you download and install both x86 and x64 versions.

How to download the Visual C++ Redistributable installers or setup?

That is all for our fixes for the Microsoft Visual C++ Runtime error. If you are experiencing other errors and issues with games on PC or handhelds, also see our fixes hub for commonly occurring errors.

  • Ahmad Hassan

    I'm a highly skilled technical writer with 5+ years of experience in providing fixes for video games and tech bugs. An expert in troubleshooting and has helped countless gamers overcome frustrating technical issues. In addition to providing bug fixes, I also specialize in writing technical reviews for video games.