I have to work on a project using different computers (home/office). I keep only Config, Content, Source, and ProjectName.uproject – I regenerate the VS project files each time via right click on project → “Generate Visual Studio project files”.
The problem is, when building the solution in VS (Development Editor / Win64), I get this error:
UnrealBuildTool : error : Couldn't find target rules file for target 'UE4Editor' in rules assembly 'ProjectNameModuleRules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Location: C:\ProjectName\Intermediate\Build\BuildRules\ProjectNameModuleRules.dll
Target rules found:
ProjectName - C:\ProjectName\Source\ProjectName.Target.cs
ProjectNameEditor - C:\ProjectName\Source\ProjectNameEditor.Target.cs
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command "D:\dev\UE_4.19\Engine\Build\BatchFiles\Build.bat ProjectNameEditor Win64 Development "C:\ProjectName\ProjectName.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
Same problem if building for Development / Win64 (except then it can’t find rules file for target ‘UE4Game’).
I tried keeping all the files (Intermediate, Saved) and it fails with the same error. Both computers use the same version of Unreal. One difference is that on my home computer, UE is installed in a different directory – but regenerating VS solution takes care of that, I think.