LNK1104 on 4.18.3 and Visual Studio 2017

Hi there! Lately I’ve been struggling with the world infamous LNK1104 error when trying to compile and Hot reloading (eg. having UE4Editor running while trying to compile from VS2017).

The problem seems to be caused by UE4 “hijacking” the binaries when running. UE4Editor should be able to “hot swap” them when compiling a new version of my source code. However, this does not seem to be the case anymore.

In the build output there’s a few warnings about deprecated conversion methods, but even when not invoking them this issue persists.

Whenever I shut down the Editor, compiling works fine. Continuously shutting down the editor, only to compile and test a few minor code changes however, is a huge pain.

Is there anything I can do to fix this or at least find the cause of UE4 not being able to hot reload?

Thanks everyone.

``1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: {ProjectName}, Configuration: Development_Editor x64 ------
2>Using 'git status' to determine working set for adaptive non-unity build.
2>Performing 3 actions (4 in parallel)
2>Route.cpp
2>D:\UNREAL\{ProjectFolder}\Source\{ProjectName}\Route\Route.cpp(78): warning C4996: 'UTextRenderComponent::SetText': Passing text as FString is deprecated, please use FText instead (likely via a LOCTEXT). Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>C:\Program Files\Epic Games\UE_4.18\Engine\Source\Runtime\Engine\Classes\Components/TextRenderComponent.h(108): note: see declaration of 'UTextRenderComponent::SetText'
2>D:\UNREAL\{ProjectFolder}\Source\{ProjectName}\Route\Route.cpp(83): warning C4996: 'UTextRenderComponent::SetText': Passing text as FString is deprecated, please use FText instead (likely via a LOCTEXT). Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>C:\Program Files\Epic Games\UE_4.18\Engine\Source\Runtime\Engine\Classes\Components/TextRenderComponent.h(108): note: see declaration of 'UTextRenderComponent::SetText'
2>D:\UNREAL\{ProjectFolder}\Source\{ProjectName}\Route\Route.cpp(88): warning C4996: 'UTextRenderComponent::SetText': Passing text as FString is deprecated, please use FText instead (likely via a LOCTEXT). Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>C:\Program Files\Epic Games\UE_4.18\Engine\Source\Runtime\Engine\Classes\Components/TextRenderComponent.h(108): note: see declaration of 'UTextRenderComponent::SetText'
2>[2/3] Link UE4Editor-{ProjectName}.dll
2>[3/3] Link UE4Editor-{ProjectName}.lib
2>   Creating library D:\UNREAL\{ProjectFolder}\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-{ProjectName}.lib and object D:\UNREAL\{ProjectFolder}\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-{ProjectName}.exp
2>LINK : fatal error LNK1104: cannot open file 'D:\UNREAL\{ProjectFolder}\Binaries\Win64\UE4Editor-{ProjectName}.dll'
2>ERROR : UBT error : Failed to produce item: D:\UNREAL\{ProjectFolder}\Binaries\Win64\UE4Editor-{ProjectName}.pdb
2>Total build time: 2.45 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.18\Engine\Build\BatchFiles\Build.bat" {ProjectName} Win64 Development "D:\UNREAL\{ProjectFolder}\{ProjectName}.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project "{ProjectName}.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The actual cause for my problem was that I accidentally deleted the {ProjectName}Editor.Target.cs file, which caused the editor to stop hot reloading my builds. I made a new dummy project and compared the contents of the Source folder.

I hope this helps.