Getting "The command ... -rocket -waitmutex -2015" exited with code -1

Hey,

it is my first time using c++ with unreal engine inside visual studio. I wanted to follow the beginners guide. But as soon as I adding the first two lines I’m getting the error:

Error MSB3073 The command
““C:.…\4.10\Engine\Build\BatchFiles\Build.bat”
MyProject2 Win64 DebugGame
“C:.…\Unreal
Engine\MyProject2\MyProject2.uproject”
-rocket -waitmutex -2015” exited with code -1.

followed by:

Error code OtherCompilationError (5)

As soon as I remove the previously added 2 lines of code. Everything compiles without any error.

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

#pragma once

#include "GameFramework/Actor.h"
#include "Graph.generated.h"

UCLASS()
class MYPROJECT2_API AGraph : public AActor
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Damage") // <--- this line
	int32 TotalDamage; // <----- this line
	
public:	
	// Sets default values for this actor's properties
	AGraph();

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	
	// Called every frame
	virtual void Tick( float DeltaSeconds ) override;

	
	
};

I have already tried to close Visual Studio; Created a new Project; Opened as Admin;Googled…

Okay so I deleted those 2 lines and closed unreal editor. Pressed the local debug button and the editor opened … so everything works as expected. Readded those 2 lines. No problems anymore.

Btw sometimes does unreal editor provide more helpfully error codes.

“Error code OtherCompilationError (5)”

In unreal there was a better understandable error showing up.