Description

If a code project is created in an Engine built from source code, and then it is switched to use a binary Engine installed by the Launcher, building the project in Visual Studio will result in numerous files being deleted from the binary Engine installation. In 4.14, 1.6 GB of files were deleted, 1.4 GB in 4.13, and 1.2 GB in 4.12. The deleted files include UE4Editor.exe, rendering the binary installation of the Engine unable to be used.

Verifying the binary Engine installation in the Launcher will replace the deleted files, but the time this takes can vary widely depending on internet connection speeds. Once this has been done, building the project again in Visual Studio does not delete the files again.

This has only been tested on Windows so far. It is unknown if the same behavior occurs on other platforms.

Steps to Reproduce

In order to reproduce this issue, you must have both a binary version of the Engine installed through the Launcher, as well as an Engine built from source code. Make sure they are both the same version (eg. 4.14.0).

  1. Create a new code project using an Engine built from source code.
  2. Build the project in Visual Studio.
  3. Once the build completes successfully, close Visual Studio and right-click on the .uproject file and choose the Switch Unreal Engine version option.
  4. Switch the project to use the binary Engine.
  5. Open the project in Visual Studio.
  6. Open a Windows Explorer window and navigate to the ...\Engine\Binaries\Win64 folder.
  7. Scroll to where the UE4Editor.exe file is visible in the window.
  8. Build the project in Visual Studio.
  9. Watch the UE4Editor.exe file in the Windows Explorer window.

RESULT:
The build completes successfully in Visual Studio, but during the build process the UE4Editor.exe file, and numerous others, are deleted from the binary Engine installation.

EXPECTED:
The build completes successfully in Visual Studio, and the UE4Editor.exe file (and all other files in the binary Engine installation) remain in place.

WORKAROUND:
Instead of immediately building the project after switching to the binary Engine, delete the .vs, Binaries, and Intermediates folders, as well as the project's .sln file. Right-click on the .uproject file and select the Generate Visual Studio project files option, open the project in Visual Studio, and build the project. It is also possible to try to open the project from the binary Engine and create a copy of the project when prompted.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

1
Login to Vote

Cannot Reproduce
ComponentTools
Affects Versions4.124.134.14
CreatedNov 18, 2016
ResolvedJun 22, 2017
UpdatedApr 27, 2018