Can't build or open project after adding C++ actor class

When I added the Mover actor class it didn’t automatically open in Visual Studio Code like in the video.
I went back to the lesson on compiling a C++ project in Obstacle Assault and noticed that it did not create the workspace file.
I think this may because I added the class before installing the C++ extension and changing the default code editor.

When I changed the default source code editor it restarted UE and now I get these errors:
image
image

I am stuck at this point because not only cannot I not build the project with the missing workspace file but I can’t even open it in UE.

How to I get past this?

You can generate Visual Studio files if you right-click on your .uproject file. It will create a SLN file.
Open that with Visual Studio, and then you can try to get your project to compile.

Before you try that, you should delete your Binaries, DerivedDataCache, and Intermediate folders.

After you get it building in Visual Studio, you can then start UE and tell it to regenerate your Visual Studio Code code-workspace file.

Alternatively, if you have Rider, you can get Rider to open the .uproject file directly.

Could you go into Saved > Logs and then post the log?

Thanks for the response. Not seeing an option to generate a .sln file.

And Rider doesn’t like the UI project file.

Thanks for the reply. Here’s the log
Unable to build/load UI project after adding C++ actor class (github.com)

The 3rd option down, “Generate Visual Studio files” is the one I mean. It creates a Solution (sln) file that Visual Studio will open.

Rider not being able to open a .uproject file is very strange. It’s just a text file, can you share it, too?

"LogInit: Warning: Incompatible or missing module: CryptRaider"
Is CryptRaider the name of your project?

Here’s the project file
CryptRaider.uproject (github.com)

Looks like I need to update my VS install
Running UnrealBuildTool: dotnet “…\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” -projectfiles -project=“C:/Users/gregb/OneDrive/Documents/Unreal Projects/Courses/CryptRaider/CryptRaider.uproject” -game -rocket -progress -log=“C:\Users\gregb\OneDrive\Documents\Unreal Projects\Courses\CryptRaider/Saved/Logs/UnrealVersionSelector-2023.11.25-11.05.52.log”
Log file: C:\Users\gregb\OneDrive\Documents\Unreal Projects\Courses\CryptRaider\Saved\Logs\UnrealVersionSelector-2023.11.25-11.05.52.log
Log file: C:\Users\gregb\AppData\Local\UnrealBuildTool\Log_GPF.txt

Some Platforms were skipped due to invalid SDK setup: IOS, Android, Linux, LinuxArm64.
See the log file for detailed information

Generating VisualStudioCode project files:
Discovering modules, targets and source code for project…
Microsoft platform targets must be compiled with Visual Studio 2022 17.4 (MSVC 14.34.x) or later for the installed engine. Please update Visual Studio 2022 and ensure no configuration is forcing WindowsTargetRules.Compiler to VisualStudio2019. The current compiler version was detected as: 14.29.30148

Which is odd

While you’re updating, make sure you have these modules:

There is some C# in Unreal for the build system, so you need the Universal pack. I keep going back and forth between UE and Unity, so I don’t think you need the Unity modules. My Visual Studio is a little newer than yours, but not much.

I don’t see anything obviously wrong with your .uproject file. I have no idea why Rider won’t open it. :frowning_face:

After updating I was able to generate the VS files, open in VS Code and build the IDE. Now I can open the project in Unreal.

Thanks for all the responses.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms