Engine source code was not found. In order to use a C++ template, you must have engine source code in Engine/Source

I tried creating a c++ project, but this message pops up before letting me create it “Engine source code was not found. In order to use a C++ template, you must have engine source code in Engine/Source” i have checked if the source code was there, and it was, i have veryfied the version of unreal, reinstalled it, installed a new version, always checking the source code was included in options, i’ve tried opening unreal directly, skipping epic, i’ve verified visual studio set up and even updated it, and the message still appears no matter what.

What version of Visual Studio do you have?

And what version of Unreal Engine 4 do you use?

i tried with a lot of versions, in the end i uninstalled all of them and installed 4.24.3 and Visual studio community 2019, but i tried with community 2017 and enterprise 2017

Try to install and enable this settings in Visual Studio installer:

ok i had to reinstall vs 2017 cause i couldn’t find that option on the 2019, but it still displays the same error

Unreal Engine 4.24 need to use Visual Studio 2019, unlock Unreal Engine 4.23 that can use Visual Studio 2017 and 2019.

here is a video that shows how to sett up Visial Studio 2019

Can you please mark this as resolved?

It works now! Thanks! i uninstalled everything and reinstalled 4.23.1 with visual studio 2017 and now it works, it’s weird 'cause that’s what i had when it showed me the error the first time, but now it works. Thanks

the problem reappeared after i restarted my pc, i think it has to do with windows defender, because it was off when i solved the problem and on when i tried and the problem reappeared