AdamT
AdamT

Reputation: 39

Why won't my Unreal 5 project build, even though visual studios does not detect any issues?

I'm brand spanking new to the Unreal engine, and only know a little c++, but I've been following this tutorial to the exact detail (asides from naming variables slightly different things, but I'm consistent so it doesn't matter):

https://www.youtube.com/watch?v=KQgOqyYoHAs

Visual studios says there's "No issues found", but when I try to build (at 34:10 in the video, after following all of the right instructions) it fails and I get this message:

2>UnrealBuildTool : error : Unhandled exception: Dependency file "C:\Users\Administrator\Documents\Unreal Projects\MyProject7\Intermediate\Build\Win64\UnrealEditor\Development\MyProject7\MyProject7.init.gen.cpp.json" version ("1.2") is not supported version

all I understand is that something I have isn't the right version but what is that thing? Thank you

Upvotes: 0

Views: 5719

Answers (3)

Andrzej Krygier
Andrzej Krygier

Reputation: 1

I have resolved "json 1.2" issue after updating to Visual Studio 2022 17.2.2 (tool chain 14.32.31329) and Unreal Engine to 5.0.2. Possibly updating the tool chain is enough, but I did not check it.

With this update I am also able to build under VS with Unreal Engine Editor opened in the background.

Enjoy!

Upvotes: 0

jimjamjahaa
jimjamjahaa

Reputation: 31

$search = '^\s*"Version":\s"1\.2",$'
$replace = '    "Version": "1.0",'
$folder = '.\Intermediate'

Get-ChildItem -Path $folder -Filter *.json -Recurse -File -Name| ForEach-Object {
    $file = Join-Path $folder $_
    (Get-Content $file) -replace $search, $replace | Set-Content $file  
}

kinda jank powershell script i have been using to fix this. needs to be done any time you modify a source file. wish i had a better fix.

Upvotes: 1

AdamT
AdamT

Reputation: 39

NVM I solved it by changing line of code near the top in that "MyProject7.init.gen.cppjson" from "1.2" to "1.0", and tried rebuilding it. I kept getting errors that mentioned other files that still had that 1.2 number, so I just kept changing them until the errors stopped showing up.

Upvotes: 0

Related Questions