Please help me figure out how to add a C++ class to the Blueprint project.

Please help me figure out how to add a C++ class to the Blueprint project.
I encountered a problem - I add a C++ class (using Tools → new C++ Class) (it doesn’t matter which one, which type, the error still occurs), generate Visual Studio project files (even if I don’t generate it, it doesn’t change the result), I open the sln of the project and when I try to build the project, this error appears (in the photo) and in the log there is this message - "Severity Code Description Project File Line Suppression State
Error MSB3073 The command “F:(00A)UE5.3\engine\UE_5.3\Engine\Build\BatchFiles\Build.bat AICarSysTestEditor Win64 Development -Project=“F:\AIcarCPP\AICarSysTest\AICarSysTest.uproject” -WaitMutex -FromMsBuild” exited with code 9009. AICarSysTest F:\Visual_studio\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44
". After that, when you try to open the project, the following message appears (second photo). If I start the project, it works, but without C++ Classes.

Previously, I somehow managed to create a C++ class, but now for some reason these errors appear even though I have already tried hundreds of options.

I use Visual Studio and UE5.3.2, the project was created based on the vechicle preset and Blank. As far as I know I have all the plagins I need installed, both for UE and VS

Also, please tell me how to completely delete or rename a previously created class, because if I’m not mistaken, my problems started exactly after I tried to delete/rename the created C++ class
AI_car_test_Bp_CPP - Microsoft Visual Studio 27.03.2024 4_07_44
Missing AI_car_test_Bp_CPP Modules 27.03.2024 4_06_24

What is the compile error?There’s no problem with adding C++ file to a Blueprint project.It is the right way to convert Blueprint project to C++ project.

the compilation error always occurs in this file (on the screen) in line 44 (highlighted on the screen) with the log I wrote earlier. I don’t understand why this happens and how to fix it, because the error appears for some unknown reason in some system file. What can be done about it?

You have to delete them from explorer or visual studio, that can’t be done from Unreal

Have you tried creating the vehicle preset directly in c++ instead of creating it from the BP version?

Okey, thank you

yes i tried but it still gives the same compile error in the same file
also, for some reason, there were thousands more errors like:

Severity Code Description Project File Line Suppression State
Error (active) E0276 name followed by ‘::’ must be a class or namespace name UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 939
Error (active) E1696 cannot open source file UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 68
Error (active) E1696 cannot open source file UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatform.h UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 126
Error (active) E1696 cannot open source file UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerSetup.h UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 1082
Error (active) E1574 static assertion failed with UCS2CHAR and UTF16CHAR are expected to be the same type. UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 1024
Error (active) E1574 static assertion failed with TCHAR should either be ANSICHAR, WIDECHAR or UTF8CHAR. UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 1028
Error (active) E1574 static assertion failed with WIDECHAR should be wchar_t UE5 F:(00A)UE5.3\engine\UE_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h 1033

Please tell me what could be wrong with my Visual Studio (obviously there are no errors, but the editor still finds them)?

These errors don’t ring me any bell, but every time I had issues generating the project files it was because I was missing something in the visual studio install (almost always .NET stuff), and once it was because of the BuildConfiguration.xml file (C:\Users\Ares\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml) that I had to edit as I explained in this post.

This are the individual components that you might need to check in the Visual Studio Installer (I hid the ones that I am certain are not responsible of this issue but I have way too many engine versions installed, so something might be unnecessary to you)
image

Reinstall your engine.If it’s compile version,delete Engine\Intermediate\ ,rerun Setup.bat and then GenerateProjectFiles.bat.I think your engine was broken for some reason.