4.1.1 to 4.2 project conversion

My problem is that when i convert my 4.1.1 project to 4.2 it says "error cannot open ‘windows.h’ ". because it doesn’t exist in the “C:\Program Files\Unreal Engine\4.1\Engine\Source\Runtime\Core\Public\HAL” folder

so i copied all the header files i used to compile c++ code , ‘windows.h’ etc… and it all works fine but when it try’s to open ‘sal.h’ it says

The project failed to compile with this version of the engine. Build output is as follows:
ERROR: In C:\Program Files\Unreal Engine\4.2\Engine\Source\Runtime\Core\Public\HAL\sal.h: #include “codeanalysis\sourceannotations.h” contains backslashes (‘'), please use forward slashes (’/') instead.

this basically means it cant read the usual header files for some reason and i cant edit the header file because it will conflict with all the other header files.

any help is MUCH appreciated. thanks in advanced.

Hi 2147,

Could you please provide the full output log with the error messages?

Hi 2147,

Are you using the installed binary version of the Editor? What steps did you take when you tried to upgrade your project from 4.1.1 to 4.2?

Ok so this is the out put log

The project failed to compile with this version of the engine. Build output is as follows:

Found 0 directories to search FillProjectInfo took 0.0001 seconds Running C:/Program Files/Unreal Engine/4.2/Engine/Binaries/DotNET/UnrealBuildTool.exe MMOFPSProjectEditor Development Win64 -project="C:/Users//Documents/Unreal Projects/MMOFPSProject/MMOFPSProject.uproject" -rocket -editorrecompile -progress Parsing headers for MMOFPSProjectEditor Code generation finished for MMOFPSProjectEditor and took 2.8 Performing 6 actions (max 3 parallel jobs) [2/6] rc.exe MMOFPSProject.rc PCH.MMOFPSProject.MMOFPSProject.h.cpp C:\Users\\Documents\Unreal Projects\MMOFPSProject\Source\MMOFPSProject\Resources\Windows\MMOFPSProject.rc(11) : fatal error RC1015: cannot open include file 'windows.h'.

C:\Program Files\Unreal Engine\4.2\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8) : fatal error C1083: Cannot open include file: 'new': No such file or directory -------- End Detailed Actions Stats ----------------------------------------------------------- ERROR: UBT ERROR: Failed to produce item: C:\Users\\Documents\Unreal Projects\MMOFPSProject\Intermediate\Build\Win64\MMOFPSProjectEditor\Development\UE4Editor-MMOFPSProject.exp Cumulative action seconds (6 processors): 0.00 building projects, 0.21 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other UBT execution time: 8.24 seconds

all i did was open’ed unreal engine 4.1.1 project in unreal engine 4.2 it said

'This project was made with a different version of the Unreal Engine. Converting to this version will rebuild your code projects.

New features and improvements sometimes cause API changes, which may require you to modify your code before it compiles. Content saved with newer versions of the editor will not open in older versions.

We recommend you open a copy of your project to avoid damaging the original.’

i clicked ‘convert in place’ and i got the error message as follows in the other message

Hi 2147,

I have made several attempts to reproduce this issue, and have not had any luck so far. Are you able to make a new project in 4.1.1 from a template and upgrade it to 4.2? If so, do you see the same error or does it upgrade successfully?

I will try , but the project i am trying to upgrade is a empty code project

Ok so when i create a ‘fps blueprint’ project, i can convert it fine but when i add code to the project i get that error because it try’s to search the HAL folder for header files but it doesn’t seem that any header files were intended to be there and i don’t know why i keep getting this error?

Do you know how i could fix this?

It looks like UnrealBuildTool isn’t detecting your visual studio environment correctly.

Could you download the attached file, rename the extension to ‘.bat’ and run it, then post the info.txt file it generates in tlink texthe same directory?

could you add all the header files in the previous version of the project then try and convert it to 4.2

I cant because in the previous version it has the same header files :confused:

ok so i did that and this is the info file it generated Info

From that info.txt file, it looks like your PATH environment variable isn’t set correctly. I’m not sure how it got to that state, but I’d hazard a guess that some poorly written installer didn’t update it properly.

I think this will fix it: Right click on “Computer” in your Windows start menu, go to “Properties” and select “Advanced System Settings” from the sidebar on the left. Go to the “Advanced” tab, you’ll see an “Environment Variables…” button. Click on that.

Find the “PATH” variable in the list, and add “C:\Windows\System32” to the end, separated by a semicolon.

You can see more information here:

FINALLY!!! Thank You soooo much it worked!!! , my project successfully upgraded to 4.2.1 you don’t realize how much this has helped me Thank you, Thank you, Thank you.