Can't get Visual Studio 2013 to work with Unreal Engine 4.9

I’ve been, for the past three days, trying to get Visual Studio 2013 to work with Unreal Engine 4.9 with C++ projects to no avail. I need the capability to do so for one of my classes this semester. I’ve tried just about everything, short of reinstalling Windows 10, to get Visual Studio to work. The installation hangs for hours and when I try to get it to continue it goes on but in the end I get the error:

Running C:/Program Files/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/[REDACTED]/Documents/Unreal Projects/MyProject6/MyProject6.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.IO.FileNotFoundException: F:\Visual Studio Community 2013\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.VCEnvironment.SetEnvironment(CPPTargetPlatform Platform)
   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.DoPostStartupStuffThatCanAccessConfigs(String[] Arguments)

I’ve searched on Google about this same issue to no avail. I’ve tried uninstalling, repairing, restarting, letting it sit, trying the web installer, trying the ISO, mounting and extracting the ISO with no luck. Does anyone have an idea of how to make Visual Studio 2013 Community work? (I don’t have the luxury of being able to reinstall windows at this time.)

Hey -

There are a couple questions that will help me understand what’s happening. Are you having problems getting the 4.9 engine version? Are you able to create a new project (code/blueprint) through the launcher? Are you able to use other engine versions (such as 4.8.3)?

Cheers

I have the 4.9 version of the engine, but whenever I go to create a c++ project it gets to about 90-95% and throws the above error. I am using the launcher to create the project(s) and blueprint works without any issues. I also have 4.6.1 and I, basically, get the same error when I try and make a c++ project:

Failed to generate project files. Log output:
Running C:/Program Files/Epic Games/4.6/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/[REDACTED]/Documents/Unreal Projects/MyProject6/MyProject6.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.IO.FileNotFoundException: F:\Visual Studio Community 2013\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.VCEnvironment.SetEnvironment(CPPTargetPlatform Platform)
   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.Main(String[] Arguments)

Hi ,

Could you please download this file and place it on your desktop? Remove the .txt extension, and then run the file. It will create a new Info.txt file on your desktop that contains some information about your Visual Studio installation. Please upload that back here so we can take a look at it.

I ran the .bat and here, except for where I redacted my full name and other usernames in the listing of my Desktop folder, is the resulting info.txt.link text

Thanks,

That result was unexpected. The batch file should have provided an output of your Visual Studio Common7\Tools directory, not your desktop. For comparison, this is the result that I get when I run the batch file on my machine. If you use a Windows Explorer window to navigate to the Common7\Tools directory in the top line of your info.txt file, is there anything there?

I don’t have the \Tools folder where the system environment folder points to. I do, however have the right files on a different drive.

EDIT: I cannot get the “pushd %VS120COMNTOOLS%…..\VC\bin\x86_amd64 >>%LOGFILE%” to work with the changed system environment folder and I do not seem to have the same files as you did in your example.

Is your Visual Studio installed on your C:\ drive, or your F:\ drive?

If you have Visual Studio installed on your F:\ drive as shown in the picture above, you can edit your VS120COMNTOOLS Environment Variable to point to the correct location. Go to Control Panel\System and Security\System -> Advanced system settings -> Environment Variables and carefully edit the VS120COMNTOOLS variable to show the correct location. Note: This is where you can find and edit Environment Variables in , and I believe Windows 10 is the same (I don’t have Windows 10 installed so I can’t verify that).

Sorry I didn’t reply sooner, my phone hadn’t synced to the server.

I changed it to the above screenshot’s location and the first part of the .bat file works but the second still spits out my desktop files.

I have attached the new info.txt to this with my desktop files redacted.link text

I managed to get it to work. I had to install Visual Studio 2013 Community, delete the files, restart the computer and then install Visual Studio 2013 Ultimate. Other than force quitting the computer, I’m not sure why it worked but regardless I got it to work.

Hi ,

I am glad to hear that you were able to get it working. UE4 relies on several groups of files to be located in areas that are correctly referenced, or it will fall over. Having looked over what happened with the batch file outputting information for your Desktop some more, it makes a little more sense now. Since it couldn’t locate the correct folder initially, it defaulted to where it was currently located when it was asked to output the directory information.

When you had corrected the VS120COMNTOOLS Environment Variable, and received the correct directory information from the batch file for the 32-bit toolchain, the batch file then tried to locate the directory for the 64-bit toolchain in relation to the location stored in VS120COMNTOOLS, but apparently wasn’t able to locate that directory either.

Now that you are past this hurdle, you should be fine. Please let us know if you run into any additional issues.