Sometime yesterday while working, I needed to remove a C++ class I had created. (Being new to Unreal, I was unsure how to do this) So I went ahead and just deleted the .cpp and .h files. After doing this, however, I was unable to recompile my project, even after replacing the files via git.
Because the project I was working in was a bit of a toy, I decided to just delete the project and create a new one, but I get an error from UBT saying ‘The file exists’
I saw this report saying something similar, but the error seemed different, I was unable to create a project following the steps posted.
I first deleted just my install of 4.7, but then uninstalled all Epic Games/Unreal software and re-installed in an attempt to fix.
My last attempt was to create a blueprint project and just ‘Add code to project’, but even that throws an error saying ‘Unable to generate project files’.
Below is the error I get when trying to create a new C++ project.
Failed to generate project files. Log output:
Running C:/Program Files/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Ben/code/ue4/BugTest/BugTest.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.IO.IOException: The file exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
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)
If this is related to the known issue mentioned in the other thread, I’ll just try to downgrade to a lower version of UE until this is fixed, but if there are any cache directories I can delete that will allow me to fix this even temporarily, that would be awesome.