I was setting up a Git repository and had some trouble with Visual Studio’s build files. I initially added all files to the git repository expecting anyone to be able to open my Visual Studio solution (.sln) file so my team can compile their code. That was silly of me, considering Visual Studio sets up a lot of Computer specific references and running a VS Solution file that was not made on your computer confuses Visual Studio.
So when I setup my git repository I only included the following:
This allows me to open the Test123.uproject in the Unreal Editor then select “Add Code to Project” which generates a Visual Studio Solution and the “Intermediate” directory that contains several Visual Studio build files. However when I attempt to compile this Solution it gives the following errors:
Error 1 error LNK1104: cannot open file 'C:\Users\Flip\Documents\Unreal Projects\Test123\Binaries\Win64\UE4Editor-Test123.dll' C:\Users\Flip\Documents\Unreal Projects\Test123\Intermediate\ProjectFiles\LINK Test123 Error 2 error : Failed to produce item: C:\Users\Flip\Documents\Unreal Projects\Test123\Intermediate\Build\Win64\Test123Editor\Development\UE4Editor-Test123.exp C:\Users\Flip\Documents\Unreal Projects\Test123\Intermediate\ProjectFiles\ERROR Test123 Error 3 error MSB3073: The command ""C:\Program Files\Unreal Engine\4.0\Engine\Build\BatchFiles\Build.bat" Test123Editor Win64 Development "C:\Users\Flip\Documents\Unreal Projects\Test123\Test123.uproject" -rocket" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 Test123
Though if I close Visual Studio/Unreal Editor and compile again it Builds fine. So my question is how can I only include my Config, Content, and Source while being able to open in Unreal Editor and compile in Visual Studio (without doing the round-about steps above)?