Ctrl F5 in Visual Studio 2022 does not launch Unreal Editor because project is a library?

In every Unreal tutorial I’ve read, they say that you can press either F5 or Ctrl F5 to launch the Unreal editor from Visual Studio.

However, when I do that, I get an error message saying “A project with an Output Type of Class Library cannot be started directly.”

This is using an auto generated VS solution from the Unreal editor, and I do see the Live Code link working (mostly) and that compiles and updates the project if I already have the Unreal editor up and running.

Do I need to download the full Unreal source code and have that be part of the solution in order to build and run from within VS?

This is using Unreal 5.3 and Visual Studio Community 2022 17.8.6 with “Game development with C++” and “IDE support for Unreal Engine” installed.

Update: I was able to solve this for myself although it wasn’t fun to figure this out…

Firstly, it appears that the code for 5.3.2 is actually broken (described here: Error compiling the Automation Tool after updating Visual Studio today (Unreal 5.3.2) - #14 by so_toasty)

I was getting the same errors when building the solution. Building the project compiled fine, though. And if Live Coding was enabled, it patches fine.

After applying the suggested fixes to the engine source code, those errors (null ref and # of arguments error) went away.

Secondly, I had the Android and iOS options installed. Removing those helped clean up some of the errors.

Thirdly, I updated Visual Studio to 17.9.6 (latest version as of right now)

Finally, I disabled Live Coding, and forced it to be disabled by default in the Unreal Editor.

Now hitting Ctrl F5 launches the editor properly.

Since I’m still learning to work with Unreal and C++ together, I’m editing header files pretty frequently, so Live Coding is just getting in the way, and will cause blue print errors complaining about invalid C++ classes.

tl;dr: Fix engine code and disable Live Coding to improve the C++ experience.

1 Like