Chaos source build failed

I want to use chaos destruction so I followed the steps in the Documentation to build the Engine from source. However it always failed. I got these messages:

fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

error MSB3075: The command “…..\Build\BatchFiles\Build.bat -Target=“UE4Editor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command.

How can I make it work?

Make sure Visual Studio and the Unreal Engine source folder are in the same drive. That helped me.

First error might indicate you should clean rebuild. Second error: Build.bat is a script that launches UnrealBuildTool.exe and from the arguments you can see UnrealBuildTool.exe is trying to compile the project UE4Editor and failing at it. There must be more detailed error message before this one, look at the raw Output in visual studio or the error log of UnrealBuildTool.exe which is Engine\Programs\UnrealBuildTool\Log.txt