The issue may not be always the synchronisation with the generated sln project and the intermidiate folder from the uproject file, or some VS configurations or so.
The highly likely reason: Instead the issue may lie within your code. A mere coding bug simply.
The solution: For instance, I made a mistake intentially by commenting "USTRUCT()" while keeping "GENERATED_BODY()" within the struct definition, which is illegal from the UE coding standard stand point:
StructMsgArchisim.h
//USTRUCT() (line 64)
struct FDS_ARCHISIM_CONTROL {
GENERATED_BODY()
INT32 statusAndCounterAndLength;//CONVERT32
float emitterTime; // REAL32
double xRef, yRef; // REAL64
};
The errors window on VS showed the following, which doesn't mention this USTRUCT error whatsoever:
(screenshot) https://ibb.co/JRTjQQh
The best approach in this case to identify the error is to check the log file located at
C:\Users\<userName>\AppData\Local\UnrealBuildTool\log.txt
There, I found the following warning, which points directly to the reason behind the command failure:
...
Running Internal UnrealHeaderTool D:\SaadEssahliDesk\UE-PseudoArchisim\Archive\UE-Archisim_1Client1APC\Visualisation_a_UE4272_1Client1APC\SIMU.uproject D:\SaadEssahliDesk\UE-PseudoArchisim\Archive\UE-Archisim_1Client1APC\Visualisation_a_UE4272_1Client1APC\Intermediate\Build\Win64\SIMUEditor\Development\SIMUEditor.uhtmanifest -WarningsAsErrors -installed
D:\SaadEssahliDesk\UE-PseudoArchisim\Archive\UE-Archisim_1Client1APC\Visualisation_a_UE4272_1Client1APC\Source\SIMU\StructMsgArchisim.h(64): Warning: The identifier 'GENERATED_BODY' was detected in a block being skipped. Was this intentional?
Total of 0 written
Total execution time: 8.03 seconds
...