Hi there,
I have a project (started originally on UE4’s initial version) which I have been upgrading over time to keep up with new features. It was on version 4.26 and building successfully. This project is a C++ one and I have a significant number of custom classes etc.
I have downloaded the latest UE5 source code and built the engine successfully. However, when trying to build my project, I am getting a persistent error which I don’t know how to fix.
When I build the project, the following is in the output log:
1>Invalidating makefile for RoguelikeEditor (RoguelikeEditor.Target.cs modified)
1>Could not find definition for module 'Roguelike', (referenced via RoguelikeEditor.Target.cs)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "C:\UE5\UnrealEngine\Engine\Build\BatchFiles\Build.bat -Target="RoguelikeEditor Win64 Development -Project=\"H:\Unreal Engine 4 Projects\Unreal Projects\<project name>\Roguelike.uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "Roguelike.vcxproj" -- FAILED.
This is an issue I haven’t encountered before.
My target files look like this:
using UnrealBuildTool;
using System.Collections.Generic;
using System;
public class RoguelikeTarget : TargetRules
{
public RoguelikeTarget(TargetInfo Target) :base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange(new string[] { "Roguelike" });
}
}
and:
using UnrealBuildTool;
using System.Collections.Generic;
using System;
public class RoguelikeEditorTarget : TargetRules
{
public RoguelikeEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange(new string[] { "Roguelike" });
}
}
I am building in Development Editor Win64 configuration.
Interestingly if I comment out the lines in the target files starting ExtraModuleNames.Add
Then the project will actually build. However, when I start it I get the warning “Roguelike was built with a different version, would you like to rebuild?” If I select yes, it fails and tells me to build from the source.
I am using VS 2022.
Any tips would be hugely appreciated, I have exhausted all avenues so far. Is there an issue with the build agent finding the compiled c++ module?