Did you know that when you create an Unreal Engine 5.4 project (and possibly earlier versions), it automatically generates a .vsconfig file in your project folder?

What is a .vsconfig File?

You might be wondering, “What does a .vsconfig file do?” Well, at first glance, it might not seem like much. However, if you take a closer look, you’ll find several lines specifying Microsoft Visual Studio components. Essentially, this file lists the necessary Visual Studio components required for building and compiling your Unreal Engine game code.

So, What Can You Do with This File?

Here’s the neat part: instead of manually configuring Visual Studio by checking all the required boxes, you can simply import this file into the Visual Studio Installer. This will automatically configure all the settings for you, saving time and ensuring you have everything you need to start coding.

How to Import the .vsconfig File:

  1. Launch the Visual Studio Installer.
  2. Click the “More” button, then select “Import configuration.”
  3. Navigate to your Unreal Engine project folder and select the .vsconfig file.
  4. Click “Review details,” then hit “Install.”

And that’s it! Magic, right? Well, almost…

Troubleshooting a Common Error

In my case, I encountered an error: “The following packages could not be installed… Microsoft.VisualStudio.Component.Windows10SDK.22621: No matching package found.”

After a quick check on the Visual Studio Community components page, I noticed that there was no package available for Windows 10 SDK 22621. Instead, I found one for the Windows 11 SDK, labeled Microsoft.VisualStudio.Component.Windows11SDK.22621.

To fix this, I simply edited the .vsconfig file by removing the Windows 10 SDK 22621 entry and adding these two lines:

"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Component.Windows11SDK.22621",

I saved the file, re-ran the installer, and voilà—a happy .vsconfig file and a properly configured Visual Studio.

I hope this helps you, and happy coding!