UE 5.4 compile error Catch2

I got this same Catch2 error while trying to move a 5.3 project to 5.4. The project was failing to compile and upon attempting to build in VS 2022, it failed with this error among others.

In case anyone is encountering this error in a similar context, this was the fix:

Open the .sln file, find MyProjectEditor.Target.cs, and make sure DefaultBuildSettings is in there and that it’s set to .Latest (DefaultBuildSettings = BuildSettingsVersion.Latest;). In my case this was completely missing, but in some others I’ve seen, it was set to .V2 or the like, which was also causing issues.

After that, try to build your project again (don’t build the solution, just the project!), and it should successfully build, and allow you to open up the project in UE 5.4.

2 Likes