BuildingEscape could not be compiled

So, I have the same problem as the guys below but I didn’t find the answer. When I try to execute .uproject file “BuildingEscape could not be compiled” error message appears. Also when I try to generate VS project files the following error appears:

Running C:/Program Files/Epic Games/UE_4.25/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/ASUS/Documents/BuildingEscapeClone/BuildingEscape/BuildingEscape.uproject” -game -rocket -progress -log=“C:\Users\ASUS\Documents\BuildingEscapeClone\BuildingEscape/Saved/Logs/UnrealVersionSelector-2020.08.22-20.48.10.log”
Discovering modules, targets and source code for project…
While compiling C:\Users\ASUS\Documents\BuildingEscapeClone\BuildingEscape\Intermediate\Build\BuildRules\BuildingEscapeModuleRules.dll:
c:\Users\ASUS\Documents\BuildingEscapeClone\BuildingEscape\Source\BuildingEscape\BuildingEscape.Build.cs(7,45) : error CS1502: ??? ???室?騩 ??ॣ?㦥??? ??⮤ ??? “UnrealBuildTool.ModuleRules.ModuleRules(UnrealBuildTool.ReadOnlyTargetRules)” ??? ??᪮?쪮 ???⨬?? ???㬥?⮢
c:\Users\ASUS\Documents\BuildingEscapeClone\BuildingEscape\Source\BuildingEscape\BuildingEscape.Build.cs(7,50) : error CS1503: ???㬥?? “1”: ?८?ࠧ??? ⨯? ?? “UnrealBuildTool.TargetInfo” ? “UnrealBuildTool.ReadOnlyTargetRules” ???
c:\Users\ASUS\Documents\BuildingEscapeClone\BuildingEscape\Source\BuildingEscapeEditor.Target.cs(11,41) : error CS1002: ??? ;
ERROR: Unable to compile source files.

What could it be? (VS19, UE4.25.3)

Hi!
I think I have had something similar in the past. I went to my project folder and rightclicked the .uproject file in there (it has the same name as the project so BuildingEscape.uproject in my case) and clicked the Generate Visual Studio project files.
I hope this can help

1 Like

Hello! Thanks for feedback. I tried but it gives me an error: unable to compile source files (as I’ve written above)

What repo are you cloning?

I followed the link that Sam told about (lecture project changes below the previous lecture I’ll give it as I get access to my computer) and did everything that Sam did


Here it is.

Could you show your Target.cs and Editor.Target.cs?

Sure. Target.cs:

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class BuildingEscapeTarget : TargetRules
{
	public BuildingEscapeTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
	}

	//
	// TargetRules interface.
	//
}

Editor.Target.cs:

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class BuildingEscapeEditorTarget : TargetRules
{
	public BuildingEscapeEditorTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Editor;
		ExtraModuleNames.Add("BuildingEscape")
	}
}

Sorry, forgot to also ask for the Build.cs

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;

public class BuildingEscape : ModuleRules
{
	public BuildingEscape(TargetInfo Target) : base(Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

		PrivateDependencyModuleNames.AddRange(new string[] {  });

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
		
		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");
		// if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
		// {
		//		if (UEBuildConfiguration.bCompileSteamOSS == true)
		//		{
		//			DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
		//		}
		// }
	}
}

You did not update that correctly. TargetInfo here

public BuildingEscape(TargetInfo Target) : base(Target)

Ought to be ReadOnlyTargetRules

Thx, I’ll try it as I get to home

It gives the same error :frowning:
Maybe I shouldn’t change this in all files?

Just the Build.cs needed that change.

Changed, still not working…

Is it the same error? Could you provide all 3 files?

Yeah, the same error, here are the files.

Target.cs:

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class BuildingEscapeTarget : TargetRules
{
	public BuildingEscapeTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
	}

	//
	// TargetRules interface.
	//
}

Editor.Target.cs:

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class BuildingEscapeEditorTarget : TargetRules
{
	public BuildingEscapeEditorTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Editor;
		ExtraModuleNames.Add("BuildingEscape")
	}
}

Build.cs:

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;

public class BuildingEscape : ModuleRules
{
	public BuildingEscape(ReadOnlyTargetRules Target) : base(Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

		PrivateDependencyModuleNames.AddRange(new string[] {  });

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
		
		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");
		// if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
		// {
		//		if (UEBuildConfiguration.bCompileSteamOSS == true)
		//		{
		//			DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
		//		}
		// }
	}
}

Could you provide the log anyway?

That’s not the log. It’s in Saved > Logs.

Privacy & Terms