I got exactly the same problem today. There was no code error, but whenever I modify a particular .cpp file, the log
[Adaptive unity build] Excluded from XXX unity file: YYY.cpp
appeared, and the following error occurred.
C1189 error: "No Target Architecture" C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h 173
I am using Git for the source control, so I tried removing .git folder, then the build succeeded. After the success, moving back the .git folder did not cause any build error.
So, as some people guess, I also guess Git sometimes affect the issue. I think it might be an issue of Unreal Build Tool rather than Git.
However, I have no idea when this problem occurs. In my case, it suddenly appeared.
As JonTronne says, adding a single space to the code caused this problem.
Maybe a rare Unreal Build Tool’s bug??