GenerateProjectFiles.bat not finding (VS 2013)

I have VS2013 for Windows Desktop freshly installed and it runs fine. When trying to generator the projectfiles the following error occures:

GenerateProjectFiles ERROR: We
couldn’t find a valid installation of
Visual Stud io. This program requires
either Visual Studio 2013 or Visual
Studio 2012. Ple ase check that you
have Visual Studio installed, then
verify that the HKEY_LOCAL
_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\InstallDir
(or HKEY_LO
CAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\InstallDir
on 32-bit machines) registry value is
set. Visual Studio configures this
value when it is installed , and this
program expects it to be set to the
'\Common7\IDE' sub-folder under a
valid Visual Studio installation
directory.

When i check for that entry, it is there and the enviroment variable is set:

https://dl.dropboxusercontent.com/u/20085974/errorupdate.png

What do i do? Reinstalling changes nothing. I checked the engine out of Github serveral times in case something was corrupted.

My different pathes:

Engine folder (where the .bat sits) C:\Users\Sebastian\Documents\GitHub\UnrealEngine

VS 2013 folder C:\Program Files (x86)\Microsoft Visual Studio 12.0

Please help me!

Edited this entry to add a better screenshot and a update of the problem. (The InstallDir path does not show completly in the screenshot, but it definitly points exactly to …\Common7\IDE\

Hey Migano -

Have you looked at this post here:

GenerateProjectFiles.bat doesn't recognize Visual Studio Ultimate 2013 - Programming & Scripting - Epic Developer Community Forums

The determined ultimately that a strange character in the game engine folder structure was generating this error like a & character.

Thank You

Eric Ketchum

Yes i have and made sure this is not the cause of the error (i should have mentioned that). The thing is i miss almost all of the entries VS normally creates in the registry and reinstalling does not help. I downloaded the official .iso and installed it, restartet several times, reinstalled it.

Hey Migano -

Can you take take the attached .txt file save it to your desktop and delete the .txt extension to create a .bat file. Run that file and it will generate an Info.txt file. Upload that Info.txt for me to look at.

Thank You

Eric Ketchum

Get-VS-Info

Thank you for taking the time to help me. I just removed my real name out of the into.txt

https://dl.dropboxusercontent.com/u/20085974/info.txt

Hey Migano -

Try the following:

Right-Click “Computer” >> Properties >> Advanced System Settings >> “Environment Variables”, search for VS120COMNTOOLS variable and add the location of your common 7/tools directory: Mine looks like this:

*C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools*

If you do not have the VS120COMNTOOLS variable then make new with that exact name and the value should be the common 7/tools directory like above.

Let me know if this does or does not work for you -

Thank You

Eric Ketchum

The environment variable VS120COMNTOOLS was already there with a valid path: “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE”.

I also have VS110COMNTOOLS for VS 2012 there. Maybe this creates the conflict?

Do you also have a copy of VS2012 on your CPU? You could try to remove that variable and see if that clears the problem, but if you do have VS 2012 on your CPU then it will not work again until that variable is put back in exactly as it is.

Also just a quick check as well, Are you using the Express 2013 for Windows Desktop and NOT the Express 2013 for Windows?

Eric Ketchum

Removing the enviroment variable for VS 2012 does not change anthing …

I installed now VS 2013 ultimate (registered, no trail version). I have now all the needed registry entries, but i still get the same error!

Edit: After investigating the .bat structure i edited the “GetVSComnToolsPath.bat” (because it created the error) and set the path manually to the right directory. Running the “GenerateProjectFiles.bat” now generates a new error:

Setting up Unreal Engine 4 project
files… Der Befehl “msbuild” ist
entweder falsch geschrieben oder
konnte nicht gefunden werden. (German for: The command “msbuild” is written incorrectly or has a typo or cannot be found)

GenerateProjectFiles ERROR:
UnrealBuildTool failed to compile.

Drücken Sie eine beliebige Taste . . . (Press any key to continue…)

Edit 2: when opening “UnrealBuildTool.csproj” in VS2013 i can compile it without any problems when selecting “debug” (see → link )… but i dont know what development folder he means in his solution.

Hey Migano -

I believe that this is the selection you make in Visual Studio either a Debug version or a Development version in Solution Configurations.

Eric Ketchum

Yes, i know that. The problem is not solved by this. I am still having the problem, that the .bat to generate the project files does not find VS 2013. When i enter the path manually into the .bat’s it does not work with the following ones. I really’d like to start programming … It looks to me that the .bat files cannot access the registry or the enviroment variables at all …

I updated the first post to show more information. This problem is still not solved! Please help me!

For everyone that need a solution to this problem:

Make sure, you have the path to your registry (In my and most cases: C:\Windows\System32\ ) entry in your enviroment variables under Path:

I don’t know if this helps, but I just downloaded both the latest preview build and the 4.4.1 build. The 4.4.1 build ‘GenerateProjectFiles.Bat’ worked fine. The preview build generated the same error message as in this thread, so the problem must be within the preview build files.