Right clicking a uproject and using Generate Project Files returns an empty screen with the message “Failed to Generate project files”. It fails instantly and there is no info on why it failed at all.
It happens with every project, new, old and freshly created.
Visual Studio environment variables are set up correctly. I can add project files in editor, as well as refresh the VS files in editor.
I’ve tried reinstalling 4.6 already. Also, I’m using Binary 4.6.1 from the launcher.
Thanks for your help in advance!
In a binary project, you first need to add C++ source files from the editor before you can generate project files. There should be a warning that pops up when you attempt to do so before having added code to the project. Have you added code to the project yet?
Yes, I have. I’ve tried adding new c++ files in editor in both new and old projects.
I can add new code files from the editor, as well as refresh project files from there.
I just can’t use the right click on uProject → generate project files.
I noticed this started happening after upgrading to 4.6, as if some sort of file association broke.
Sorry for the delay in getting back to you. A quick question for you. Could you try right-clicking on one of the .uproject files you are trying to generate project files for and select the
Switch Unreal Engine version option? Verify that the Engine version selected in the drop-down list is version 4.6, then click OK. Part of the process that results is generating project files. Could you let me know if that fails for you as well?
Hey there! Thanks for answering even in the days staff isn’t expected to answer!
Switching versions doesn’t work either. When it gets to the Generate Project Files part it just fails the same.
If I want to switch engine versions I have to do it from the launcher and then it will work. If I want to generate project files I have to do it in editor.
Thanks for the phenomenal support!
Could you please download this file and place it on your desktop? Remove the .txt extension and run the file. It will create a new info.txt file. If you could upload that file so I can take a look, it should help me rule out a few possibilities.
Executing the Bat doesn’t seem to generate the info.txt
My apologies, I skipped a step in the instructions I gave you. Create a new folder named “temp” on your desktop and place the .bat file inside, then run it. The new .txt file will be created inside the folder. I am able to place the .bat file directly on my desktop and run it, but that doesn’t seem to work for everyone.
The bat didn’t seem to work in my desktop or any subfolder (maybe because the path contains a blank space?) I just placed it somewhere else and it worked. Here it is:
Thanks for getting that information. Everything appears to be fine in the 32-bit toolchain. I am a little concerned about the INCLUDE and LIB variables being blank in the amd64 toolchain, though. Let me see if I can eliminate that as a possible cause of the issue you are experiencing.
I know this has been a while and it may not be helpful but I got this error a few times and it happened for different reasons. It may or may not help you but I’ll share my experiences anyway.
The first time I had this was on build prior to public release so it may have been fixed. it was because of some duplicate files I manually removed from my project but the metadata was still present in the intermediate folder so linking (or some other EPIC black magic) failed returning this error. I deleted the intermediate folder (you may want to back your up first just in case) and made sure only the proper files where in my source folder. Then I generated my files and all was well. Given that this happens for new projects as well, this is likely not the case.
The next time this happened because my folder was set to read only because of perforce. This was a easy fix though.
Another time this happened, it was an limitation on the max path length (but again on a pre-public build). The place my projects was saving as well as the file name created a directory structure that exceeded the max length of the path inside some of the generated folders.
I’m not sure if any of this will help but it has been my experience and at least provides more tests that could lead to possible answers or at least hint at some.
After looking at the info you provided a bit more, it actually looks like the amd64 toolchain may be incomplete or missing entirely. If you could, please open a Windows Explorer window and navigate to the following directory:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
Check and see if you have a folder in this location named
x86_amd64 (actually, it might be a good idea if you could list all of the folders you see in this location).
I have “x86_amd64” and “1033”
Thanks for taking the time to comment.
I’ve had that happen to me before and it was usually project dependant (both with perforce and max path length) but in this case, it happens with every single project, including newly created ones and everything
Sorry for the delay. If those are the only two folders present in that drive location, that may be where the problem lies. In that location on my computer I have the following folders:
What version of Visual Studio 2013 are you using? If you are using Express, do you have the For Windows Desktop version? Would you be able to perform a repair installation of Visual Studio, or reinstall it completely?
Yes, I am using Visual Studio 2013 for Windows Desktop. I’ll try to leave it reinstalling overnight (my country’s internet sure is slow and unreliable). I’ll post again with the results on that!
I uninstalled and reinstalled VS. The problem is still there and no new folders have appeared in C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
I was getting this issue as well. To fix it I:
- opened the editor (if that is still possible for you)
- Goto File
- Click on “Refresh Visual Studio Project”
Hopefully that works for you.
Hi, how would you do all of this for version 4.8.3? The github doesn’t have the files in any of the links and the documentation is outdated.
Hi Death wyrm,
Are you experiencing the same trouble that dissonanceint described in his original post when right-clicking on the .uproject file and selecting the Generate Project Files option?