Unreal Error "This project could not be compiled. Would you like to open it in Visual Studio?"



Running Z:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject11 Development Win64 -project="E:/Users/AJ/Documents/Unreal Projects/MyProject11/MyProject11.uproject" -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE
 @progress push 5%
Parsing headers for MyProject11Editor
  Running UnrealHeaderTool "E:\\Documents\Unreal Projects\MyProject11\MyProject11.uproject" "E:\\Documents\Unreal Projects\MyProject11\Intermediate\Build\Win64\MyProject11Editor\Development\MyProject11Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for MyProject11Editor in 3.2144107 seconds
 @progress pop
Performing 9 actions (4 in parallel)
[3/9] Resource ModuleVersionResource.rc.inl
[2/9] Resource PCLaunch.rc
PCH.MyProject11.h.cpp
MyProject11PlayerController.cpp
MyProject11.generated.cpp
MyProject11GameMode.cpp
MyProject11Character.cpp
E:\\Documents\Unreal Projects\MyProject11\Source\MyProject11\MyProject11PlayerController.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled header
E:\\Documents\Unreal Projects\MyProject11\Intermediate\Build\Win64\UE4Editor\Inc\MyProject11\MyProject11.generated.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled header
E:\\Documents\Unreal Projects\MyProject11\Source\MyProject11\MyProject11GameMode.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled header
E:\\Documents\Unreal Projects\MyProject11\Source\MyProject11\MyProject11Character.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled header
MyProject11.cpp
E:\\Documents\Unreal Projects\MyProject11\Source\MyProject11\MyProject11.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled header
ERROR: UBT ERROR: Failed to produce item: E:\\Documents\Unreal Projects\MyProject11\Binaries\Win64\UE4Editor-MyProject11.dll
Total build time: 19.12 seconds


I just reinstalled visual studio with C++ and this happened… Anyone know whats wrong?

This usually works to resolve Visual Studio weirdness:

  1. Close UE4 Editor
  2. Delete everything in /Intermediate/ and /Saved/
  3. Open UE4 Editor
  4. File -> Refresh Visual Studio Project
  5. Open Visual Studio project, attempt to compile

Apparently Visual Studio updated this morning, and the new update breaks Unreal.

Now I’m getting a new error:



Running Z:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe topdownyo1 Development Win64 -project="E:/Users/AJ/Documents/Unreal Projects/topdownyo1/topdownyo1.uproject" -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE @progress push 5%
Parsing headers for topdownyo1Editor
  Running UnrealHeaderTool "E:\\Documents\Unreal Projects	opdownyo1	opdownyo1.uproject" "E:\\Documents\Unreal Projects	opdownyo1\Intermediate\Build\Win64	opdownyo1Editor\Development	opdownyo1Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for topdownyo1Editor in 3.1258864 seconds @progress pop
Performing 9 actions (4 in parallel)
[2/9] Resource PCLaunch.rc
[3/9] Resource ModuleVersionResource.rc.inl
PCH.topdownyo1.h.cpp
Z:\Program Files (x86)\Epic Games\4.12\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(11): fatal error C1083: Cannot open include file: 'EngineBaseTypes.generated.h': No such file or directory
ERROR: UBT ERROR: Failed to produce item: E:\\Documents\Unreal Projects	opdownyo1\Binaries\Win64\UE4Editor-topdownyo1.dll
Total build time: 9.92 seconds


wtf…

This is the key information in the log file:

This means that you installed a new version but are trying to re-use compile results from an older (or at least different) version.

Did you make sure to re-generate all source files after removing the intermediates?
Re-run GenerateProjectFiles.bat in the root of your unreal engine.

I just created a new C++ project and get the same error at line 261 that Snowl0l gets. I have Visual Studio 2015 Update 3 RC. Do you suppose that that has something to do with it. I just tried creating the project in v4.12.3 as well as v4.11.2 and get the same results when the project creation wizard runs. I can create a Blueprint project just fine.

Bump

still having issues and can’t do anything =(



Running Z:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject4 Development Win64 -project="E:/Users/AJ/Documents/Unreal Projects/MyProject4/MyProject4.uproject" -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE @progress push 5%
Parsing headers for MyProject4Editor
  Running UnrealHeaderTool "E:\\Documents\Unreal Projects\MyProject4\MyProject4.uproject" "E:\\Documents\Unreal Projects\MyProject4\Intermediate\Build\Win64\MyProject4Editor\Development\MyProject4Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for MyProject4Editor in 3.7645768 seconds @progress pop
Performing 7 actions (4 in parallel)
[2/7] Resource PCLaunch.rc
[3/7] Resource ModuleVersionResource.rc.inl
PCH.MyProject4.h.cpp
MyProject4GameMode.cpp
MyProject4.generated.cpp
MyProject4.cpp
E:\\Documents\Unreal Projects\MyProject4\Intermediate\Build\Win64\UE4Editor\Inc\MyProject4\MyProject4.generated.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled headerE:\\Documents\Unreal Projects\MyProject4\Source\MyProject4\MyProject4GameMode.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled headerE:\\Documents\Unreal Projects\MyProject4\Source\MyProject4\MyProject4.cpp: error C4599: '/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE': command line argument number 261 does not match precompiled header


ERROR: UBT ERROR: Failed to produce item: E:\\Documents\Unreal Projects\MyProject4\Binaries\Win64\UE4Editor-MyProject4.dll
Total build time: 37.23 seconds


**** it, going back to vs 2013…

going back to 2013 didn’t work. Im dunzo

New user here, I thought I might be able to add to this. In the same situation as NCEdElliott’s post, I found that trying to recompile a modified blueprint (ie adding a new class) causes that same “command line argument number 261 does not match precompiled header” error.

This contains a workaround if you’re working with engine source.

opening the WindowsPlatformCompilerSetup.h file in source code (this won’t correct it for the binary version of the Engine, unfortunately)
remove 4599 from the table of warnings at the top
add #pragma warning(disable : 4599) below the list