Cannot build due to .json file version not supported

Hello,
Regardless of the editor IDE I’m using (VS Code or VS) I get an error stating that a json file version is not accepted.


After reading online I read that you should just open the file and change the version to 1.0. This needs to be done for multiple files and has to be redone after a clean build if I read correctly. Is this normal or do I have to change some settings for this to not happen? It’s quite annoying.

I am receiving the same error and am interested in how the teacher does not receive this error because the solution of changing 1.2 to 1.0 works in the .json file, but it is more and more files with every variable and has to be changed every time we rebuild

Do we need to revert to VS 2019? I saw some solution here but my ‘mybuildconfiguration’ file doesn’t have any of those lines Unhandled exception when building blank project: Version ("1.2") is not supported version - Programming & Scripting - Unreal Engine Forums

I hit this error as well. I wrote a Python script (below) to automatically hack all the JSON files to be version 1.1 instead of 1.2.

After editing any source code, but before recompiling (either in VS2022 or using Live Coding), I always run my Python script (below) from my <project_root>/Intermediate/Build/Win64 directory.

My python script (I called it fix_json.py):

import os, fnmatch
def findReplace(directory, find, replace, filePattern):
    for path, dirs, files in os.walk(os.path.abspath(directory)):
        for filename in fnmatch.filter(files, filePattern):
            filepath = os.path.join(path, filename)
            print(filepath)
            with open(filepath) as f:
                s = f.read()
            s = s.replace(find, replace)
            with open(filepath, "w") as f:
                f.write(s)

findReplace(".", "Version\": \"1.2", "Version\": \"1.1", "*.json")

This needs fixed, this course is becoming unusable.

I have tested the following build tools which you can install via Windows Start Menu > Visual Studio Installer > Modify > Individual components

v142

v143.32 is where the problem with the 1.2 version started.

With v14.29 things just work™; So I suggest you install that one.
v14.30 and v14.31 require you to specify the compiler version in the BuildConfiguration.xml as described in the linked thread above.

v14.30 is 14.30.30705
v14.31 is 14.31.31103


After installing an older compiler listed above you will need to do a full rebuild. To ensure that you have done that and not an incremental build please delete the Binaries and Intermediate folders before compiling.

3 Likes

Just to add to Dan’s post, it looks like this issue was fixed on the main branch about a week and a half ago. They updated the code so that it checks against a minimum version number (1.0) instead of exact version numbers (i.e. 1.0, 1.1). I expect it will no longer be a problem once 5.0.2 is released.

1 Like

Can you please explain better :smiley: been stuck on this for a few hours trying to get past this single course, getting frustrated :smiley:

I figured it out. Noticed the two folder i could delete from within Studio Code :smiley: thank you though.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms