Async race condition when generating type library files such as dte80a.bat

There seems to be a race condition in UBT where async writes to files generated during graph building can collide. We’re seeing this for the VisualStudioDTE module, resulting in build errors like this:

IOException: The process cannot access the file 'T:\HordeData\StandardCi\Sync\Engine\Intermediate\Build\Win64\x64\UnrealEditor\Development\VisualStudioDTE\dte80a.bat' because it is being used by another process.It appears this comes from VCToolChain.GenerateTypeLibraryHeader() being called for each module that depends on VisualStudioDTE, which then results in multiple async writes to the same file getting queued up and potentially colliding.

The simplest fix seems to be to just force writing these files synchronously. I created a PR for that if you’re aligned with the approach https://github.com/EpicGames/UnrealEngine/pull/13708

Thanks, this is a common issue and I missed this specific code path. I’ve merged this and it should be synced back to github in the next day or so to the ue5-main branch.