Can't Build My First C++ Project

I can’t get my first C++ project to build in Visual Studio Enterprise 2022. I’ve gone through the set-up process.

  • List item

I’ve created a new 3rd person game using C++.
Set Visual Studio as the default IDE
Added the Unreal Engine Visual Studio Extension to Unreal
Added a new C++ Class in Unreal
Open VS.
Build Ctrl+Shift+B in Visual Studio

I get this error. “Expecting to find a type to be declared in a module rules named ‘VisualStudioTools’ in ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. This type must derive from the ‘ModuleRules’ type defined by UnrealBuildTool.
Build failed.”

Any ideas?

Thanks,
Jeff

things to try:

delete folders: binaries, intermediate and the .vs file

right click on the .uproject fila and select Generate Visual Studio Project Files

in VS: buikd > clean solution

then try building again (CTRL+SHIFT+B)

Thanks for your help. I tried your steps, and I got this after the build. To confirm, was I to delete the whole .vs folder? That’s what I did.

The type or namespace name ‘UnrealBuildTool’ could not be found (are you missing a directive or an assembly reference?)
The command ““C:\Program Files\Epic Games\UE_5.5\Engine\Build\BatchFiles\Build.bat” New55Game4Editor Win64 DebugGame -Project=“D:\Users\Jeff\Documents\Unreal Projects\New55Game4\New55Game4.uproject” -WaitMutex -FromMsBuild -architecture=x64” exited with code 8.

Then when I try to launch the project, it says " The following modules are missing or built with a different engine version:

New55Game4

Would you like to rebuild them now?"

I clicked ‘Yes’, but it wasn’t able to load after the rebuild.

Thanks,
Jeff

I completely uninstalled Visual Studio 2022, rebooted it, and reinstalled it. It’s building now. Thanks for the advice. I appreciate it.

Jeff

(post deleted by author)

He’s misleading you. I followed his instructions and lost everything. Nothing works now.

if you keep

.uproject file
Contents folder
Source folder
/project/plugins folder (if you have local plugins)

and delete EVERYTHING else in the project you dont lose anything man.
I am not misleading

*If you delete the Config folder, you will reset the project’s settings. This is usually undesirable and can be game breaking if the project loads data from Config files (see: Epic Game’s Lyra for an example of that).