# Generating project files from source on 5.7 with Visual Studio 2026

**URL:** <https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941>\
**Category:** Programming & Scripting\
**Tags:** build, unreal-engine, generate-project-fil, bug-report, build-failed, CPP\
**Created:** [November 14, 2025, 3:58am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941 "2025-11-14T03:58:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [November 14, 2025, 3:58am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/1 "2025-11-14T03:58:29Z")

</div>

# Issue

If, like me, you uninstalled VS 2022 after installing VS 2026, you’ll get the following error when generating project files or loading the `Default.uprojectdirs` file on Rider to launch the UE5 source project:

```auto
Visual Studio 2022 x64 must be installed in order to build this target.

```

# Cause

UE 5.7 does recognize VS 2026 in its project generation just fine. However, the `DatasmithMaxExporter` plugin is overwriting the `WindowsCompiler` in its `DatasmithMax2017.Target.cs` file to VS 2022. As soon as file generation gets to that plugin, the `UnrealBuildTool` tries to setup compilation with VS 2022 and fails, cancelling the project file generation.

# Fix

Open `DatasmithMax2017.Target.cs` and delete the lines setting `WindowsPlatform.Compiler`:

```csharp
WindowsPlatform.Compiler = WindowsCompiler.Clang;
WindowsPlatform.Compiler = WindowsCompiler.VisualStudio2022;

```

After deleting those lines, starting at line `33`, the file should look like this:

```csharp
	if (!Directory.Exists(MaxSDKLocation))
	{
	}

	Console.WriteLine("Skipping " + MaxSDKLocation);
	AdditionalCompilerArguments += " -Xanalyzer,-isystem-after" + MaxSDKLocation;
}
else
{
	AdditionalCompilerArguments += " /Zc:referenceBinding- /Zc:strictStrings- /Zc:rvalueCast- /Zc:preprocessor-";
}

WindowsPlatform.bStrictConformanceMode = false;
WindowsPlatform.bStrictPreprocessorConformance = false;

```

Save it. Then try re-opening it on Rider or generating project files again and it works.

---

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [November 14, 2025, 4:03am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/2 "2025-11-14T04:03:30Z")

</div>

I did worry about breaking something when making that change. But no other `.Target.cs` or `Build.cs` files override the compiler like that. The only similar thing is another Datasmith file _reading_ the current compiler to conditionally change its build behavior. So, I’m 99% confident this won’t break anything (can’t be 100% confident of anything in coding lol).

---

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [November 14, 2025, 8:28am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/3 "2025-11-14T08:28:22Z")

</div>

Had a project throw the same “VS 2022 must be installed” error. Turned out it had this in `DefaultEngine.ini`:

```ini
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
Compiler=VisualStudio2022

```

Maybe it was set in the platform settings in the Project Settings? Idk, but deleting that `Compiler` line allowed project files to be generated for this project.

---

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [November 14, 2025, 8:30am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/4 "2025-11-14T08:30:25Z")

</div>

Follow me, for more ways of preventing you from working on your Unreal project in subtle ways that don’t give you any useful errors whatsoever!

---

<div class="post-metadata">

**Author:** ![ZeusHong](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeushong/32/88714_2.png) [@ZeusHong](https://forums.unrealengine.com/u/ZeusHong)\
**Post date:** [November 15, 2025, 2:06pm UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/5 "2025-11-15T14:06:10Z")

</div>

Thank you very much for your help, which resolved my problem in a timely and accurate manner!

---

<div class="post-metadata">

**Author:** ![TheRealWhoopsie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheRealWhoopsie](https://forums.unrealengine.com/u/TheRealWhoopsie)\
**Post date:** [November 26, 2025, 4:00pm UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/6 "2025-11-26T16:00:03Z")

</div>

Yes, I had a similar error “Visual Studio 2022 installation not found“ after updating to UE 5.7 because my editor was set to specifically target the VS 2022. Although it used to work before the update. My way was to open a blueprint only project in order to change this setting in the Editor Preferences → Source Code Editor to “Visual Studio”.

---

<div class="post-metadata">

**Author:** ![vnvtkan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vnvtkan](https://forums.unrealengine.com/u/vnvtkan)\
**Post date:** [December 16, 2025, 4:55am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/7 "2025-12-16T04:55:47Z")

</div>

helpful, thanks! I just changed 2022 to 2026 and it worked

---

<div class="post-metadata">

**Author:** ![7Dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/7dev/32/752460_2.png) [@7Dev](https://forums.unrealengine.com/u/7Dev)\
**Post date:** [December 18, 2025, 8:29pm UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/8 "2025-12-18T20:29:18Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [January 2, 2026, 10:09am UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/9 "2026-01-02T10:09:22Z")

</div>

Thanks for posting your solution! There may be a faster way to fix that case if we find the `.ini` file storing that setting for the editor in the engine source folder.

I don’t have it set on my engine source, but the variable controlled by that editor preference is `USourceCodeAccessSettings::PreferredAccessor`. It’s a `Config` `UPROPERTY`, stored in `EditorSettings.ini` files. It belongs to the `SourceCodeAccess` module. Therefore, this is probably what we’d find in one of those files, if that setting has been overridden in _Editor Preferences_:

```ini
[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor="VisualStudio2022"

```

Those files will be in:

- [Engine Installation Folder]/Engine/Config/BaseEditorSettings.ini
- [Engine Installation Folder]/Engine/Config/[Platform Name]/PlatformNameEditorSettings.ini

---

<div class="post-metadata">

**Author:** ![Madmer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/madmer/32/1083599_2.png) [@Madmer](https://forums.unrealengine.com/u/Madmer)\
**Post date:** [April 13, 2026, 11:41pm UTC](https://forums.unrealengine.com/t/generating-project-files-from-source-on-5-7-with-visual-studio-2026/2674941/10 "2026-04-13T23:41:27Z")

</div>

If, like me, none of the tips in this thread have helped you, here’s a quick and easy solution that worked for me.

Go to `%APPDATA%\Unreal Engine\UnrealBuildTool\` and delete the `BuildConfiguration.xml` file.  
Or open cmd and enter:

```auto
del "%APPDATA%\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml"

```

The engine will recreate it on its own, but it will no longer contain the hardcoded reference to Visual Studio 2022 🙂
