Microsoft.MakeFile.targets(45, 5): [MSB3073] code 6.

Hello guys. I have a problem with build my CPP project, after Unreal Engine decided that it doesn’t want to build my project anymore.

Microsoft.MakeFile.target(45, 5): [MSB3073] exit the command "D:\EGS\Unreal\UE_5.1\Engine\Build\BatchFiles\Build .bat ShootThemUpEditor Win64 Development -Project="D:\EGS\Unreal\Vlad\ShootThemUp\ShootThemUp.uproject" -WaitMutex -FromMsBuild" with code 6.

I do not know how to check where the problem is in the code using this error, I looked that it often occurs, but I didn’t find a sensible solution.

1 Like

Build error 6 is a bit of a generic error message and can be caused by various issues in your code or build environment.

  • Check for any syntax errors in your code: Make sure there are no syntax errors in your C++ code that could be causing the build to fail. Look for any red underlines in Visual Studio or other IDEs you might be using.
  • Check for missing or incorrect library references: Ensure that all necessary libraries are included and correctly referenced in your project settings.
  • Check your project’s log files: You can check your project’s log files located in the Saved/Logs directory in your project’s root folder. Look for any error messages or warnings that might be related to the build process.
  • Rebuild your project: Try rebuilding your project from scratch, starting with a clean build. You can do this by deleting the Intermediate and Binaries folders in your project’s root directory and then rebuilding the project.
  • Try building a new, empty project: Create a new, empty project and try building it to see if the issue is specific to your current project.
  • Check your Unreal Engine installation: Make sure your Unreal Engine installation is up to date and configured correctly.
1 Like

I was having this same problem, with no further details. Then I noticed I had 3 instances of UE running with 3 different projects, I closed them all, then building worked.

The thing is that when another UE project is already opened with an instance of the editor, there’s an error saying Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game.

4 Likes

Thank you!! I had been very careful to make sure I had closed down the project I was trying to build, but I didn’t even think that having a different project open in Unreal could be causing the issue. Building now :slight_smile:

My issue was that I had improper UPROPERTY definition :smiley:

More specifically I was defining a component like this in my header file:

UPROPERTY(Category = “AI”)
TObjectPtr BlackboardComponent;

It turns out that you can’t just have a UPROPERTY with only a Category. Once I added “EditAnywhere” first, then it was all working again.

UPROPERTY(EditAnywhere, Category = “AI”)
TObjectPtr BlackboardComponent;