ERROR : UBT error : Failed to produce item: ....lib

When i recompile project with opened editor, i get this error, but hot-reload was complete and new types is accessible in editor. But VS telling me:

ERROR : UBT error : Failed to produce item:

Build: 1 success: 1 failed.

But everything is build and hot-reload was successful.

PS: VS2017.

Hey newbprofi-

It sounds like you are getting a reported hot reload failure in Visual Studio even though the hot reload is successful in the editor, is that correct? If this is the case, this is a known issue that you can find here: Unreal Engine Issues and Bug Tracker (UE-42205) . As shown in the report, we hope to have this fixed for 4.16.2. Something that may help would be to compile the code with the editor closed. Compiling without preforming a hot reload should clear out old .dll files that may be causing the conflict.

Cheers

i found that UBT trying to create .lib with wrong ID:

2>[3/4] Link UE4Editor-MyProject2-8924.dll

2>[4/4] Link UE4Editor-MyProject2-4435.lib

2> Creating library Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject2-8924.suppressed.lib and object Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject2-8924.suppressed.exp

2> Creating library Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject2-8924.lib and object Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject2-8924.exp

2>ERROR : UBT error : Failed to produce item: Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject2-4435.lib

at begin it creates new libs with ID = 8924, but error is about creating “strange” lib with ID = 4435 which is unused by editor, because new lib with ID = 8924 is successfully hot-reloaded.

Editor log:

LogHotReload: New module detected: UE4Editor-MyProject2-8924.dll

LogHotReload: Starting Hot-Reload from IDE

LogClass: MyStruct2 HotReload.

LogContentBrowser: Native class hierarchy updated for ‘MyProject2’ in 0.0013 seconds. Added 2 classes and 2 folders.

Display: HotReload successful (0 functions remapped 1 scriptstructs remapped)

what is going on?

Here’s whats going on if i compile code via Editor->Compile button:

CompilerResultsLog: Info [3/4] Link UE4Editor-MyProject2-7303.dll

CompilerResultsLog: Info [4/4] Link UE4Editor-MyProject2-7303.lib

As we see, DLL and LIB IDs identical, as we need. But if i compile via VS2017, that IDs are different.

i will try later to create brand new project and test if i will have the same error.