Windows Machine unable to use C++ since 4.12.5 Update

Since 4.12 creation of any C++ project (or attempt to “generate visual studio project files” on any project existing, or new) gives this error:

UnrealBuildTool Exception**: ERROR: Not expecting project C:\Users\gbril\Documents\Unreal 
Projects\MyProject2\Intermediate\ProjectFiles\UE4.vcxproj to already have a target rules of with configuration name Game (UE4GameTarget) while trying to add: VSTTestUnrealTarget**

Please, what does this mean? Where is this originating and why? I have actually looked at the source for the unrealbuildtool but it is in no way clear.

Have installed, uninstalled…have tried new projects, old projects. Have every forum article that touches on this issue and nothing seems to match.

Epic: I just need insite into the issue: you don’t have to solve this for me, but I don’t even know where to look. And as it stands, I have a completely useless game dev machine since this update and can not work. Have posted previously on this and gotten no answers or suggestions.

“creation of any C++ project (or attempt to “generate visual studio project files” on any project existing, or new) gives this error:”

This sounds like a really fundamental issue, I hope Epic gets back to you on this!

On 4.11 everything continues to work fine on this same machine?

:heart:

Hey -

Given the error message you’re receiving, it sounds like you are trying to add a new .Target.cs file for your module. Let me know if 's answer here helps get your code to compile:

Cheers

Here’s the thing, I am not trying to add anything. I will get this error with an absolutely new project I am trying to create from the launcher. If I create a blank C++ project, I will get this error when the launcher tries to create the project.

If I try to generate files on a .uproject, one that has always worked (and works on other machines) I will get this error.

Something is broken internally. I did see that forum post you mention, but that’s not my issue.

To help investigate and possibly rule out some possible causes, could you try the following:

  • For a current project, please try to delete the Intermediate folder and build again
  • From the Launcher, verify the engine version that you’re using and try creating a new project.
  • If you are using any plugins that are enabled in a project by default, please try disabling/removing the plugin and create a project
  • Please review this list of software that may conflict with Unreal Engine setup/project creation: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Additionally, please let me know which version of Visual Studio you’re using?

I have done the above. Note that this error will happen even if you use the launcher to create a completely new c++ project. When you create the project, you will get the error immediately from the launcher as it tries to initially compile the new project.

So there isn’t an opportunity to delete an intermediate folder.

This only happens in version 4.12.5. My 4.11 works correctly.

I am using visual studio 2015 update2

What would help most is understanding what it is the build tool is attempting to do when it encounters the error. If this is explained conceptually I can look into the build tool source and figure out what’s happening. But I don’t know enough about this game target it is becoming confused over.

When using the binary engine, the source for UnrealBuildTool is pre-compiled and unavailable. You mentioned that Generate Visual Studio project files for an existing project also gives this error, can you try removing the Intermediate folder from one of these projects and try again? Also, after attempting to create a new project and receiving this error, does the project get created or is the folder location still empty? If the project does get created, can you open the Intermediate/ProjectFiles folder and see if the UE4.vcxproj file exists and what is inside it? Another test would be to create/save the project in a new folder path. Please let me know if you can save the project in your root C: drive?

I am not near the ailing machine at moment, so will get this information when I can get to it again…but I can tell you from previous debugging where I have tried some of the above:

  1. When intermediate files directory is recreated (after I delete it, I have tried that) there are no actual project files that get created. It DOES create Build, I think, and the intermediate directory…but there are no project files created anywhere in that subdirectory. I do get project creation and an intermediate directly, but it fails before creating any project files.

  2. I know the source for the build tool is compiled, but I also have the sources present and I find it can be useful to edit the unrealbuilttool independently in order to troubleshoot.

I will try what you suggest when I get to the other machine.

Hey -

Have you had any luck in testing the possible solutions mentioned previously? If you are still unable to use code projects, please provide any additional information possible.

I ultimately had to get working again on that machine, so I experimented and found that by switching my version to a source repo for unreal (which I downloaded and built), I was able to generate projects and build for 4.12.5 (albeit source). That wasn’t surprising in that I was still able to generate projects for 4.11. But then when I switched back, something seems to have changed, and I was able to generate the project again.

So, at this point, I guess it is “working” again, but I am bothered as to what exactly went wrong and am fearful of this returning.

It would be real great if we could get some transparency on what the build tool is trying to do exactly when it generates project files…a simple multi point step by step would be really helpful in understanding and troubleshooting.