Build errors

All of a sudden after committing and starting a new feature branch, I’m getting the following errors:


1>LogFileManager : error : MoveFile was unable to move 'C:/UnrealEngine/Projects/UEPlugin002/Plugins/MyThingPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyThingPlugin/PluginSettings.generated.h.tmp' to 'C:/UnrealEngine/Projects/UEPlugin002/Plugins/MyThingPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyThingPlugin/PluginSettings.generated.h', retrying in .5s...

1>LogFileManager : error : Error moving file 'C:/UnrealEngine/Projects/UEPlugin002/Plugins/MyThingPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyThingPlugin/PluginSettings.generated.h.tmp' to 'C:/UnrealEngine/Projects/UEPlugin002/Plugins/MyThingPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyThingPlugin/PluginSettings.generated.h'.

1>LogCompile : error : Error exporting MyThingPlugin: couldn't write file 'C:/UnrealEngine/Projects/UEPlugin002/Plugins/MyThingPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyThingPlugin/PluginSettings.generated.h'

1>C:\UnrealEngine\Projects\UEPlugin002\Plugins\MyThingPlugin\Intermediate\Build\Win64\UE4Editor\Inc\MyThingPlugin\MyThingPlugin.generated.cpp(17): error C2084: function 'void UPluginSettings::StaticRegisterNativesUPluginSettings(void)' already has a body

.

The last line is particularly bewildering.

I’ve removed all the files matching .generated. and let them regenerate, but I’m still getting the same problem. Has anyone had this happen before?

So, part of the problem might be that the file that’s failing has a UObject in it and I relocated that file into a subdirectory for tidiness and make sure the include statements took that change in structure into account. Could that be causing it?

Also, the file is definitely there already - somehow it’s trying to load the .tmp file as well I think, resulting in a redeclaration error.

I’ve fixed it. First I moved the files back to their original location and fixed the paths. But I forgot to move the actual physical files themselves as well, not just their structure in VS. Once I did that, problem solved.

I didn’t find any other useful results for this issue in google so I’ll leave this here as a hint.