Unhandled exception when building blank project: Version ("1.2") is not supported version

Created a blank C++ project without starter content and when i try to build it from VS (ctrl + shift + b) without touching anything inside the UE5 Editor the build fails with unhandled exception.

Severity	Code	Description	Project	File	Line	Suppression State
Error		Unhandled exception: Dependency file "D:\ue5\CasualGames\Game\Intermediate\Build\Win64\UnrealEditor\Development\Game\GameGameModeBase.gen.cpp.json" version ("1.2") is not supported version	Game	D:\ue5\CasualGames\Game\Intermediate\ProjectFiles\UnrealBuildTool	1	
Error	MSB3073	The command ""D:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat" GameEditor Win64 Development -Project="D:\ue5\CasualGames\Game\Game.uproject" -WaitMutex -FromMsBuild" exited with code 6.	Game	C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets	44	

Running VS2022 and UE5.0.0 [UE5]

Any suggestions on where I can locate a fix for this? Searched these forums and google and didn’t find anyone else who experienced the same error.

1 Like

Editing GameGameModeBase.gen.cpp.json and change Version 1.2 to 1.0 triggered the same issue for a few other files. Once I changed the version on the other files to 1.0 it worked again.

Did you find any way to fix this reliably? The version in my .json files keeps reverting back to 1.2 when I edit the files.

I have not verified that this is permanent solution. It should be for the specific build but as the files are generated when you first build your project you will have the same issue for any new projects you create.

This was the first time I used UE so haven’t really sunk my teeth into it yet. If you find a permanent solution it would be much appreciated.

I’m also getting the error for a fresh c++ project. maybe this is a bug using visual studio 2022 ?

1 Like

I’ve managed to find where this happens:

https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Programs/UnrealBuildTool/System/CppDependencyCache.cs#L454

if (!String.Equals(Version, "1.1") &&
    !String.Equals(Version, "1.0"))
{
	throw new BuildException(
		$"Dependency file \"{InputFile.Location}\" version (\"{Version}\") is not supported version");
}

Still, we have to find out why version 1.2 is generated. It’s probably because of new Visual Studio version.
Tested on:

  • Visual Studio 2022 Community Preview (17.2.0 Preview 2.1)
  • Visual Studio 2022 Community (17.1.3)

Both versions yield the same error.

Edit:
Proposed a PR to fix this issue:
https://github.com/EpicGames/UnrealEngine/pull/9067

4 Likes

Great find, marked as solution and looking forward to the release where it is solved.

Also: If anyone else is new here and are confused why the links are not found in the solution. You need to link your github account to your epicgames account and join the Epic Company on github to be able to access the PR and Source Code. More info here: Downloading Unreal Engine Source Code | Unreal Engine Documentation

3 Likes

Another note: I was still having the error trying to build from Rider even after uninstalling vs 2022, and it turns out I needed to delete riderlink from my plugins.

Hello, Greetings to the Community!

I have exactly the same issue, I’ve just downloaded UE 5.0.0 released version, and created a blank project with starter content and I tried both with Visual Studio 2019 and 2020 either, both build failed because of the same exact reason.

ERROR: Unhandled exception: Dependency file “N:\Unreal\TopDownGame\Intermediate\Build\Win64\UnrealEditor\Development\TopDownGame\TopDownGameGameModeBase.cpp.json” version (“1.2”) is not supported version

both when I tried to build in VS or in UE.

Actually, is there any solutions? Shall we wait for a bugfix version, or shall I downgrade to UE4?

Thank You so much,
Miklos

1 Like

Manually changing the generated files to version 1.0 works for now.

insomnyawolf: I can confirm this issue is happening, you can workaround it by changing every "Version": "1.2", line in [ProjectDirectory]\Intermediate\Build\Win64\UnrealEditor\Development\[ProjectName] to "Version": "1.1", or "Version": "1.0", but as soon as you update and save those files, the version number becomes 1.2 again.

[Open PR here: https://github.com/EpicGames/UnrealEngine/pull/9067 which is marked as the solution to this].

Hi! I was able to reproduce this issue and managed to fix it. UE5 uses /sourceDependencies compiler option that produces these .cpp.json files.
The problem is in the latest MSVC compiler (14.32.31326: MSVC v143 - VS 2022 C++ v14.32-17.2). Starting from this compiler version, the “Version” field in the files produced is equals to 1.2.
As a temporary solution, I suggest downgrading the compiler to any lesser version. I have validated the following versions and confirm they are fine to use.
14.29.30133: MSVC v142 - VS 2019 C++ v14.29-16.11
14.30.30705: MSVC v143 - VS 2022 C++ v14.30-17.0
14.31.31103: MSVC v143 - VS 2022 C++ v14.31-17.1

You can set the compiler version via BuildConfiguration.xml in a way like

<?xml version="1.0" encoding="utf-8" ?>

<Configuration xmlns=“https://www.unrealengine.com/BuildConfiguration”>
<WindowsPlatform>
<Compiler>VisualStudio2022</Compiler>
<CompilerVersion>14.31.31103</CompilerVersion>
</WindowsPlatform>
</Configuration>

Note: You would need to Clean and Rebuild your project via IDE or manually (delete {project}/Intermediate and {project}/Plugins/{anyplugin}/Intermediate.

17 Likes

hi @Poeta_Kodu Thank you for the patch,
Move to the local directory containing the repository you have the source code in using Git Bash or Git CMD and type the command to check remote

Add a new remote
$ git remote add remV22503 https://github.com/EpicGames/UnrealEngine.git

The next command gets the pull request and uses the temporary branch ‘UEvs2200’ to merge the pull request into the repository.

$ git pull remV22503 pull/9067/head:UEvs2200

$ git status
Look for

nothing to commit, working tree clean

I fully agree, the problem was with the VS2022 17.2 PREVIEW versions. UE5 now works great with the 17.1.6 release version. Thank You so much, Miklos

2 Likes

hello – were i can find this BuildConfiguration.xml ??? and how i can downgrade vs 2022 to 17.1 — its always 17.2

1 Like

I haven’t verified this myself yet. But as far as I understand it the issue was with 17.1 and 17.2 preveiw versions.

If you look in Visual Studio Installer you should have your application listed there. If it is named Preview you will need to uninstall it and reinstall the proper full release instead from Microsoft’s website. Download Visual Studio Tools - Install Free for Windows, Mac, Linux

1 Like

Note: The documentation has not been updated for 5.0.

Update: Able to build without error…

My BuildConfiguration.xml (Located in User Folder/AppData/Roaming/Unreal Engine/UnrealBuildTool/) looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<WindowsPlatform>
<Compiler>VisualStudio2022</Compiler>
<CompilerVersion>14.30.30705</CompilerVersion>
</WindowsPlatform>
</Configuration>

Edit: Make sure you have the correct older compiler installed (use Visual Studio installer)

Edit2: You can make use of placing the BuildConfiguration.xml file in your documents folder instead of the appdata directory, as others have posted: C:\Users\USERNAME\Documents\Unreal Engine\UnrealBuildTool

29 Likes

Thanks, this solved a bunch of little errors and the pictures helped a lot.

1 Like

Thanks so much for this!
I was looking everywhere and this solved the issue.

Just as a quick helpful tip for others, you can also add the BuildConfiguration.xml file under C:\Users\<windowsUsername>\Documents\Unreal Engine\UnrealBuildTool (Aka under your users Documents folder)
UnrealBuildTool will use that config as an override to whatever is present under AppData.

1 Like

Thx man, this is a nice fix until UE5 supports newer VS2022 versions!

1 Like