Compile Error when adding C++ class to Plugin

Hi,
I am trying to get a bit into plugin development, but i am running into a problem right at the start.
When I add a plugin, recompile from source code, and then try to add a class to my plugin via the “New C++ class” wizard form the content browser, it fails to compile.

One thing i noticecd is that this only happens when I try to add certian classes. For example, no parent class or AActor parent work fine, however ActorComponent and UButton give me the following error:

Creating makefile for PluginDevelopmentEditor (no existing makefile)
Parsing headers for PluginDevelopmentEditor
  Running UnrealHeaderTool "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\PluginDevelopment.uproject" "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\Intermediate\Build\Win64\PluginDevelopmentEditor\Development\PluginDevelopmentEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors 
-installed -FailIfGeneratedCodeChanges
ERROR: 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/MyButton.generated.h': Changes to generated code are not allowed - conflicts written to 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/MyButton.generated.h.
conflict'
CompilerResultsLog: New page: Compilation - 05.10.2019 12:49:42
CompilerResultsLog: Creating makefile for PluginDevelopmentEditor (no existing makefile)
CompilerResultsLog: Parsing headers for PluginDevelopmentEditor
CompilerResultsLog:   Running UnrealHeaderTool "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\PluginDevelopment.uproject" "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\Intermediate\Build\Win64\PluginDevelopmentEditor\Development\PluginDevelopmentEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattende
d -WarningsAsErrors -installed -FailIfGeneratedCodeChanges
CompilerResultsLog: ERROR: 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/MyButton.generated.h': Changes to generated code are not allowed - conflicts written to 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/M
yButton.generated.h.conflict'

The content of the mentioned file:

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
	Generated code exported from UnrealHeaderTool.
	DO NOT modify this manually! Edit the corresponding .h files instead!
===========================================================================*/

#include "UObject/ObjectMacros.h"
#include "UObject/ScriptMacros.h"

PRAGMA_DISABLE_DEPRECATION_WARNINGS
#ifdef MYPLUGIN_MyButton_generated_h
#error "MyButton.generated.h already included, missing '#pragma once' in MyButton.h"
#endif
#define MYPLUGIN_MyButton_generated_h

#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_RPC_WRAPPERS
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_RPC_WRAPPERS_NO_PURE_DECLS
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_INCLASS_NO_PURE_DECLS \
private: \
	static void StaticRegisterNativesUMyButton(); \
	friend struct Z_Construct_UClass_UMyButton_Statics; \
public: \
	DECLARE_CLASS(UMyButton, UButton, COMPILED_IN_FLAGS(0), CASTCLASS_None, TEXT("/Script/MyPlugin"), NO_API) \
	DECLARE_SERIALIZER(UMyButton)


#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_INCLASS \
private: \
	static void StaticRegisterNativesUMyButton(); \
	friend struct Z_Construct_UClass_UMyButton_Statics; \
public: \
	DECLARE_CLASS(UMyButton, UButton, COMPILED_IN_FLAGS(0), CASTCLASS_None, TEXT("/Script/MyPlugin"), NO_API) \
	DECLARE_SERIALIZER(UMyButton)


#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_STANDARD_CONSTRUCTORS \
	/** Standard constructor, called after all reflected properties have been initialized */ \
	NO_API UMyButton(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); \
	DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UMyButton) \
	DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, UMyButton); \
DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UMyButton); \
private: \
	/** Private move- and copy-constructors, should never be used */ \
	NO_API UMyButton(UMyButton&&); \
	NO_API UMyButton(const UMyButton&); \
public:


#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_ENHANCED_CONSTRUCTORS \
	/** Standard constructor, called after all reflected properties have been initialized */ \
	NO_API UMyButton(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()) : Super(ObjectInitializer) { }; \
private: \
	/** Private move- and copy-constructors, should never be used */ \
	NO_API UMyButton(UMyButton&&); \
	NO_API UMyButton(const UMyButton&); \
public: \
	DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, UMyButton); \
DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UMyButton); \
	DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UMyButton)


#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_PRIVATE_PROPERTY_OFFSET
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_12_PROLOG
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_GENERATED_BODY_LEGACY \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_PRIVATE_PROPERTY_OFFSET \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_RPC_WRAPPERS \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_INCLASS \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_STANDARD_CONSTRUCTORS \
public: \
PRAGMA_ENABLE_DEPRECATION_WARNINGS


#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_GENERATED_BODY \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_PRIVATE_PROPERTY_OFFSET \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_RPC_WRAPPERS_NO_PURE_DECLS \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_INCLASS_NO_PURE_DECLS \
	PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h_15_ENHANCED_CONSTRUCTORS \
private: \
PRAGMA_ENABLE_DEPRECATION_WARNINGS


template<> MYPLUGIN_API UClass* StaticClass<class UMyButton>();

#undef CURRENT_FILE_ID
#define CURRENT_FILE_ID PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyButton_h


PRAGMA_ENABLE_DEPRECATION_WARNINGS

Any ideas what causes this error?

Hi! Did you find a solution to this? I have the same problem.