Help pls

Hi I just started with the c++ I want to learn. I created brand new project in 5.1.1 created brand new c++ class i have not wrote a single line of code if I try to compile I get this Severity Code Description Project File Line Suppression State
Error MSB3073 The command “D:\UE5\UE_5.1\Engine\Build\BatchFiles\Build.bat TestEditor Win64 Development -Project=“D:\UE5\Test\Test.uproject” -WaitMutex -FromMsBuild” exited with code 6. Test C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44
. And 14 errors like Severity Code Description Project File Line Suppression State
Error (active) E1835 attribute “deprecated” does not apply here Test D:\UE5\UE_5.1\Engine\Source\Runtime\CoreUObject\Public\Serialization\BulkData.h 283
and Severity Code Description Project File Line Suppression State
Error (active) E1455 member function declared with ‘override’ does not override a base class member Test D:\UE5\UE_5.1\Engine\Source\Runtime\Core\Public\Serialization\ArchiveProxy.h 162
.Please help i dont get it. I am with Visual Studio Community 2022.

Out of curiosity is your project set as the default?

in the solution explorer in
Games => test should be in bold letters.

You may be trying to compile the engine and not your project (the engine source might be missing per-requisites to compile ok).

Right click your project and select “Set as Startup Project” and try right clicking it and building.

I did try to set it up as the default it gives me this.
[2023.04.11-16.06.27:054][ 0]LogInit: Error: VisualStudioToolsCommandlet looked like a commandlet, but we could not find the class.
Command finished with exit code 1.

Build started…
1>------ Build started: Project: Test, Configuration: Development_Editor x64 ------
1>Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” TestEditor Win64 Development -Project=“D:\UE5\Test\Test.uproject” -WaitMutex -FromMsBuild
1>Log file: C:\Users\boris\AppData\Local\UnrealBuildTool\Log.txt
1>Creating makefile for TestEditor (no existing makefile)
1>Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command “D:\UE5\UE_5.1\Engine\Build\BatchFiles\Build.bat TestEditor Win64 Development -Project=“D:\UE5\Test\Test.uproject” -WaitMutex -FromMsBuild” exited with code 6.
1>Done building project “Test.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 7:08 PM and took 06.326 seconds ==========

It could be a problem with the name of the project. Perhaps “test” is throwing off the compiler in some way due to an internally used command somewhere in dot net?

Try making a fresh project with a more defined natural name and see if it compiles.

This time it did build and when I compile in the unreal it compiles but in vs code when I hit f5 it still gives this errors. What is the difference do I need to use the F5 in vs code or just compile in the unreal?

Compiling from vs with f5 is needed to build the classes. I think compile from within unreal just calls compile in vs remotely. You can also run vs without debug (ctrl + f5)

The only major difference is with “Live Coding” compilation. It works but only when doing minor changes in the code. Major additions tended to break or not be visible (at least in the past haven’t tested it since 5.0 thoroughly).