UnrealBuildTool Exception: System.IO.FileNotFoundException

Hello, my D drive died which had unreal located on it. I replaced the drive and reinstalled unreal and when I try to make a new c++ project I get an error. Here’s where I think the problem is… while replacing the drive I started cleaning up the temp folder, and probably deleted some UE4 temp files in there. I tried reinstalling UE4 multiple times and deleting every UE4 file in the temp folder I could find. But still same error.

This is the error I get when making a new c++ project:

Running D:/Program Files/Epic Games/4.8/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“D:/Users/bill/Documents/Unreal Projects/delteMe/delteMe.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
UnrealBuildTool Exception: System.IO.FileNotFoundException: D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools…/…/VC/bin/amd64\cl.exe
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at UnrealBuildTool.VCEnvironment.FindCLExeVersion(String CompilerExe)
at UnrealBuildTool.VCEnvironment…ctor(CPPTargetPlatform InPlatform)
at UnrealBuildTool.VCToolChain.GetVCIncludePaths(CPPTargetPlatform Platform)
at UnrealBuildTool.VCProjectFile.WriteProjectFile(List1 InPlatforms, List1 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)

Hello Redsett,

Lets make sure that the engine was completely removed. Could you follow the steps below and let me know if this works for you?

Steps:

  1. First uninstall the engine version
  2. Then go to this folder (your file path may differ slightly, in your case it may be the D drive): C:\Program Files\Unreal Engine\Launcher\VaultCache
  3. If there is a folder/file contained inside called ‘UE_4.8’, delete it
  4. You should now be able to re-install 4.8

I uninstalled the engine and the launcher, deleted the epic games folder and unreal engine folder. Still no go. :confused:

Just to help trouble shoot, I installed the launcher on my D drive.

Removed the engine via epic launcher, uninstalled launcher. Then deleted the folders:

D:\Program Files\Epic Games
D:\Program Files\Unreal Engine
(These folders do not exist on the C drive)

The launcher still remembered where my projects were at(which are not all in the same place), so it has to be pulling setting from somewhere.

Hello Redsett,

I have a few more suggestions/ questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Was the D drive formatted before you installed the engine on it?
  2. Can you successfully install and use the engine on the C drive?
  3. Does re-installing Visual Studio resolve the issue?

D drive was formatted. Brand new.

Just tried Installing onto C drive, same issue.

Reinstalled Visual Studio, didn’t fix.

When I installed onto the C drive it still remembered where all my projects were stored… I guess the real question is how do you forrealz uninstall UE4? Having it delete all of it’s temp files?

Hello Redsett,

If your projects are stored in the default directory the engine will know to look for the projects. I have a couple of more suggestions/questions for you. Could you try verifying your engine? Could you try installing a difference version of the engine to see if this problem still occurs?

Verify example:

50416-verifyenginehelp.png

Reinstalled everything, installed 4.7.6, "Verify"ed each engine. Same error.

Thanks Ruby for working with me here.

This looks like a problem with an environment variable on your computer, but it could also be a bad assumption in our UnrealBuildTool program about the environment variables.

Basically it can’t find the VS 2013 compiler program because the path is invalid.

Its looking here:

D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools…/…/VC/bin/amd64\cl.exe

Notice the weird “Tools…” part of the path above? That’s because a backslash is missing.

The correct path to the compiler is:

D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools../…/VC/bin/amd64\cl.exe

I think this is because on your computer, the VS12COMNTOOLS environment variable does not end with a trailing backslash.

Open your system environment variables, and make sure VS12COMNTOOLS looks like this:

*VS120COMNTOOLS=D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools*

That should fix it.

–Mike

Hmm, it seems to be correct. I also just tried re-reinstalling VS2013, same issue.

51278-2015-07-23+19_30_42-environment+variables.png

Interesting. In that screenshot, the path to the compiler is actually the correct one. So it simply doesn’t exist. Is there a chance you have the wrong version of Visual Studio installed? Can you paste a picture of the Help → About screen? If you by chance have Visual Studio Express installed (instead of Visual Studio Community), then you won’t have a 64-bit compiler. Visual C++ Tools and Templates in Visual Studio Editions | Microsoft Learn

Bingo, I installed Express instead of Community.

Sadly, now I’m getting:

error C1083: Cannot open include file: ‘windows.h’:
and
error RC1015: cannot open include file ‘windows.h’.

This seems to be a simi common issue but none of the fixes seem to work for me.

Things I’ve tried:

  • Reinstalling 8.1 SDK
  • Reinstalling VS2013 Community
  • Repairing VS
  • Reinstalling UE4
  • Setting VS project paths to inherit from parent(which fixed a lot of peoples problems before).

Here’s a picture of the env paths.

][1]

At this point the only solution I can thing of is formatting my computer. I’ve tried many many times uninstalling/deleting left over files/reinstalling all the programs. Not sure what else is left.

I fixed it! Just had to format my C drive and upgrade to Windows 10!

Sarcasm aside, it did fix the issue…