Errors when compiling simple classes on Visual Studio

I am new to c++ projects in unreal engine, and I am trying to compile a simple character controller.

When I try to compile it, VS returns 2 errors:
1- “Unable to delete hot-reload file: C:\Unreal Projects\project\Binaries\Win64\UnrealEditor-project.dll”
2-"The command ““C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat” project Editor Win64 Development -Project=“C:\Documents\Unreal Projects\project\project.uproject” -WaitMutex -FromMsBuild” exited with code 6. C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44
"

I can’t find any solution browsing around, does anyone know how to solve this errors?

Close UE5 then compile.

I use live code (CTRL + ALT + F11), if you add a lot of code shut down UE5 then compile from VS.