Visual Studio 2019 Hanging when Build (Ctrl-Shft-B)

I am following this tutorial (Unreal Engine 4 C++ Tutorial | Kodeco) and pretty sure the code is not the problem (its very basic I have just declared and initialized a StaticMesh, SpringArm, Camera.).

I’ve had VS2019 on my system for years. I use it for native cpp and for Unity for a long time and never once had it hang like this.

I have just started UE4 today, did not use fresh install of VS2019. If I ‘Compile’ inside the UE editor, all is fine. But if I Ctrl-Shift-B in the Visual Studio it hangs and I have to kill the process.

This doesn’t occur every time. For example after it hangs, I simply kill VS2019, reopen it and press Ctrl-Shift-B and then everything is fine again.

However this has happened many times in the last hour.

Version I have is: Version: 4.27.0-17155196+++UE4+Release-4.27

(if the code is relevant i post it here but I doubt it is relevant):

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

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "Components/StaticMeshComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "Camera/CameraComponent.h"
#include "BasePlayer.generated.h"

UCLASS()
class PRISONGAME_API ABasePlayer : public APawn
{
	GENERATED_BODY()



public:
	// Sets default values for this pawn's properties
	ABasePlayer();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	UStaticMeshComponent* Mesh;
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	USpringArmComponent* SpringArm;
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	UCameraComponent* Camera;


};






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


#include "BasePlayer.h"

// Sets default values
ABasePlayer::ABasePlayer()
{
 	// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	Mesh = CreateDefaultSubobject<UStaticMeshComponent>("Mesh");
	SpringArm = CreateDefaultSubobject<USpringArmComponent>("SpringArm");
	Camera = CreateDefaultSubobject<UCameraComponent>("Camera");

	RootComponent = Mesh;
	SpringArm->SetupAttachment(Mesh);
	Camera->SetupAttachment(SpringArm);

}

// Called when the game starts or when spawned
void ABasePlayer::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void ABasePlayer::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

// Called to bind functionality to input
void ABasePlayer::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
	Super::SetupPlayerInputComponent(PlayerInputComponent);

}

no response… ok thanks