Error in creating a C++ Project

I get this error when creating a new C++ project in UE 4.10.

The project could not not be compiled. Would you like to open this in Visual Studio?

Running E:/Program Files/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project=“D:/Documents/Projects/Unreal Projects/MyProject/MyProject.uproject” -rocket -editorrecompile -progress -noubtmakefiles -2015
@progress push 5%
Parsing headers for MyProjectEditor
Running UnrealHeaderTool “D:/Documents/Projects/Unreal Projects/MyProject/MyProject.uproject” “D:\Documents\Projects\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\UnrealHeaderTool.manifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -rocket -installed
Reflection code generated for MyProjectEditor in 7.8173651 seconds
@progress pop

ERROR: UBT ERROR: Failed to produce item: D:\Documents\Projects\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll
XGE execution time: 51.71 seconds

Hello,

Have you ensured that you have Visual Studio 2015 installed, including the C++ content and common tools?

I ensured that the C++ support is installed with Visual Studio 2015.

I have a few suggestions that you can try:

  • Verify your engine through the Launcher
  • Add some code to a blueprint project and see if you get the same error
  • Attempt to build the .sln in Visual Studio and see what errors you get

Verified UE 4.10 all it did was create a backup of a file and did nothing. Here is the error I get when I add code to a blueprint project.

Successfully added class ‘MyPawn’, however you must recompile the ‘MyProject2’ module before it will appear in the Content Browser. Failed to compile newly created game module.
Would you like to open the Output Log to see more details?

Here is the information from the Output Log.

And Finally when I build the project in Visual Studio 2015 here is that error.

**Severity Code Description Project File Line Suppression State
Error MSB3073 The command ““E:\Program Files\Epic Games\4.10\Engine\Build\BatchFiles\Build.bat” MyProjectEditor Win64 Development “D:\Documents\Projects\Unreal Projects\MyProject\MyProject.uproject” -rocket -waitmutex -2015” exited with code -1. MyProject C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 37
**

Hello,

I’ve spent some time looking up the error code that you are seeing ( MSB3073), and this seems to be something related to Visual Studio. From what I found, some people suggested attempting to run the program as an administrator, so go ahead and give that a shot and let me know if that makes a difference. If not, I recommend spending some time looking into MSB3073 on google and seeing if you can find a solution that works for you, as this is not an error that is specific to UE4.

Here is a link to one of the Visual Studio support pages for your convenience: Talk to Us - Visual Studio 2015 | Microsoft Docs

Have a great day

This doesn’t not solve the error originally posted I can’t create a C++ project.

Running E:/Program Files/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project=“D:/Documents/Projects/Unreal Projects/MyProject/MyProject.uproject” -rocket -editorrecompile -progress -noubtmakefiles -2015 @progress push 5% Parsing headers for MyProjectEditor Running UnrealHeaderTool “D:/Documents/Projects/Unreal Projects/MyProject/MyProject.uproject” “D:\Documents\Projects\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\UnrealHeaderTool.manifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -rocket -installed Reflection code generated for MyProjectEditor in 7.8173651 seconds @progress pop

ERROR: UBT ERROR: Failed to produce item: D:\Documents\Projects\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll XGE execution time: 51.71 seconds

This is an error from the unreal build tool.

A couple more questions:

  • Are you able to create code projects in the 4.11 Preview? If you have not tried, please do so and let me know the results.
  • What operating system are you currently on?

Also, it is worth mentioning that you should check any antivirus software that you have installed, as this has been known to interfere with the engine.

Windows 10 Pro x64. Is it totally necessary to download 4.11 because I have [redacted] internet. If it is necessary I will download and tell you.

I only have Windows Defender.

STAFF EDIT: removed profanity. Please refrain from using profanity in the future, or it’ll get caught by our filter again.

I had this same problem too. I just removed 4.10.2 then re-downloaded and reinstalled it. Now it seems to be working correctly with Visual Studio 2015.

Give this a shot ViTaLC0D3R, and see if it fixes your issue.

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

Maybe you can try compiling the source and see if it gives you the same problem. Unreal Engine 4 on GitHub - Unreal Engine

It just downloaded the 4.11 preview and this is the error I get. Which appears to be the same error as before.

Running E:/Program Files/Epic Games/4.11/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project=“D:/Documents/Projects/Unreal Projects/MyProject/MyProject.uproject” -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE -2015
@progress push 5%
Parsing headers for MyProjectEditor
Running UnrealHeaderTool “D:\Documents\Projects\Unreal Projects\MyProject\MyProject.uproject” “D:\Documents\Projects\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\UnrealHeaderTool.manifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -installed
Reflection code generated for MyProjectEditor in 2.5804308 seconds
@progress pop
Distributing 7 actions to XGE

ERROR: UBT ERROR: Failed to produce item: D:\Documents\Projects\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll
XGE execution time: 5.20 seconds

I have solved this with a little digging. So first I ran this “E:/Program Files/Epic Games/4.11/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project=“D:/Documents/Projects/Unreal Projects/MyProject/MyProject.uproject” -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE -2015” after that I received an error about a build service error. It turns out that I needed to make sure that Incredibuild services were running.

same error i deleted and re installed

Same error on 4.21. Fixed by installing VS2017 15.9 and rebuilding project (compiler asked 15.6 and above)