mrNyorm
mrNyorm

Reputation: 1

MSB3073 UE4 exited with code 6 - how do I fix this?

Ok, so I'm taking a udemy course on UE4 and when compiling I have a issue where I'm presented with my file location and told it exited with code 6. There are also a lot of errors saying that say it can't read my macros - how do I fix this? I'm relatively new to this so try to make it as simple as possible when answering. Thank you.

Upvotes: 0

Views: 18001

Answers (3)

Reahreic
Reahreic

Reputation: 629

The error message:

Error   MSB3073 The command ""C:\Program Files\Epic Games\UE_5.3\Engine\Build\BatchFiles\Build.bat" MyProject Win64 Development -Project="C:\MyProject\MyProject.uproject" -WaitMutex -FromMsBuild" exited with code 6. MyProject C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets  44

Is surfaced in Visual Studio (VS) when you tell VS to build while the Unreal Engine (UE) editor is still open.

As a rule, any time you touch C++ in UE, close the editor.

Upvotes: 1

clamum
clamum

Reputation: 1374

I was getting the exact error this question lists (also taking a Udemy course on Unreal LOL), syntax all looked fine (this project/environment worked fine the last time I used it, some months ago) and hadn't changed, so I decided to clean the solution and rebuild.

This time I got a slightly different error, and it mentioned needing Windows SDK installed.

VS Error

A quick Google of that seems to show that yeah, that's what's needed. Visual Studio Installer showed under C++ Game Development that none of the Windows SDK options were checked/installed. Since I'm running Windows 10 I checked the most recent/highest version of W10SDK and installed that.

After that I tried loading my project from the Epic Games Launcher, just like I did before starting my Udemy course 30 minutes prior. Now that said it was missing a module and that it needed to be rebuilt. Clicked "OK." The project rebuild failed.

I saw Unreal Engine could be updated from 4.27.1 (which I created my project in and which had been working without issue some months ago, like I said) to 4.27.2. Downloaded the 4GB update, still got the "missing module, rebuild" error but after clicking "OK" that time it built and UE 4 opened the project. VS2022 now builds the solution, and I can play the project within UE 4.

I have no fricking clue what just happened here, cause this all worked last time I worked on it and I changed nothing in the meantime, but it all works now.

So for others that get this, maybe:

  1. Try cleaning your solution and see if you perhaps need to install Windows SDK
  2. Maybe upgrade your UE 4 a minor version, if it's available

Head asplodes 🤷‍♂️🤷‍♂️🤷‍♂️

Upvotes: 0

Svetlana Shalonina
Svetlana Shalonina

Reputation: 21

I would advise paying close attention to syntax and UPROPERTY (what is in here).

For example, I had this situation:

    struct FGridCoord
{
    GENERATED_BODY()

public:

    UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Grids")
    int Col = 0;

    UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Grids")
    int Row = 0;

    /** Default constructor (no initialization). */
    FORCEINLINE FGridCoord() {}    <<<------ This was giving same error ---->>> FORCEINLINE FGridCoord();

And other one I had:

    UPROPERTY(VisibleAnywhere, Category = "Grids", meta = (AllowPrivateAcsess = "true")) <<<---- It had BlueprintReadOny and was giving an error
USceneComponent* RootComp;

Upvotes: 2

Related Questions