Moving C++ project between computers

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.

UBT never takes VS project in to consideration, at most VS project would not able to run UBT to build as it would have wrong pathing. Did you tried to build cleans project? you sure you copied all the files in Source? try hit rebuild.

Turns out, the project was created with "Enterprise": true (in the .uproject). The UE on my computer is not enterprise.

UBT looks for the UE target rules files (UE4Editor.Target.cs, UE4Game.Target.cs) in different places depending on whether it’s an enteprise project or not.

Removing "Enterprise": true fixed the problem for me.