I am currently attempting to use C++ with Unreal Engine for first time. However, whenever I attempt to create a new project it says that it failed to generate project files and gives me following error message:
Failed to generate project files. Log output:
Running C:/Program Files/Epic Games/4.5/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/nint8835/Documents/Unreal Projects/LetsGetCPPWorking/LetsGetCPPWorking.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at UnrealBuildTool.Utils.SetEnvironmentVariablesFromBatchFile(String BatchFileName)
at UnrealBuildTool.VCEnvironment..ctor(CPPTargetPlatform InPlatform)
at UnrealBuildTool.VCToolChain.GetVCIncludePaths(CPPTargetPlatform Platform)
at UnrealBuildTool.VCProjectFile.WriteProjectFile(List`1 InPlatforms, List`1 InConfigurations)
at UnrealBuildTool.ProjectFileGenerator.WriteProjectFiles()
at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String[] Arguments, Boolean& bSuccess)
at UnrealBuildTool.UnrealBuildTool.GenerateProjectFiles(ProjectFileGenerator Generator, String[] Arguments)
at UnrealBuildTool.UnrealBuildTool.Main(String[] Arguments)
Do you have same issue if you create a Blueprint project and then add a code class to it?
Could you please download this file and place it on your desktop. Remove .txt extension and run file. It will create a new Info.txt file on your desktop. If you could upload that here, it may give us some idea of what is going on.
Could you please download this file and place it on your desktop. Remove .txt extension and run file. It will create a new info.txt file on your desktop. If you could upload that here, it may help us determine what is happening.
We’ve not heard from you in some time. I will be marking this post as resolved for tracking purposes, however if you are still having problems creating a new C++ project please feel free to reopen this post and we will continue to investigate.