[Failed to build UnrealBuildTool] Can not build unreal project from source on VS 2022

Hey guys, I am new to Unreal 5. I was trying to build Unreal from source; here are my steps:
(1) git pull the forked unreal 5 repo
(2) installed VS with corresponding components like C++ desktop, .NET and etc…
(3) Successfully ran the setup.bat on the root folder of the project
(4) Successfully ran the genrateProjectFiles.bat
(5) After I choose development edit and win64 on VS 2022 and then build the solution output of the build error showing below.

Based on my observation: the toppest error is “Failed to build UnrealBuildTool”. And rest of other erros mostly are related to UnrealBuildTool.

The first log for "“Failed to build UnrealBuildTool” is

23>Using bundled DotNet SDK version: 6.0.302
23>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
24>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\EpicGames.MsBuild.csproj]
27>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\EpicGames.MsBuild.csproj]
24>EXEC : error : Failed to build UnrealBuildTool.
24>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat ZenDashboard Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
24>Done building project "ZenDashboard.vcxproj" -- FAILED.

Not sure why there is a race condition here. Any inputs would be much appreciated, thanks in advance…

More log after the first log is here:

20>Done building project "UE5ProgramRules.csproj".
29>------ Build started: Project: UnrealVersionSelector, Configuration: Development_Program x64 ------
29>Using bundled DotNet SDK version: 6.0.302
29>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
23>Using bundled DotNet SDK version: 6.0.302
23>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
24>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\EpicGames.MsBuild.csproj]
27>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\obj\Development\net6.0\EpicGames.MsBuild.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.MsBuild\EpicGames.MsBuild.csproj]
24>EXEC : error : Failed to build UnrealBuildTool.
24>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat ZenDashboard Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
24>Done building project "ZenDashboard.vcxproj" -- FAILED.
30>------ Build started: Project: UnrealRecoverySvc, Configuration: Development_Program x64 ------
27>EXEC : error : Failed to build UnrealBuildTool.
27>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat Unsync Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
27>Done building project "Unsync.vcxproj" -- FAILED.
31>------ Build started: Project: UnrealPak, Configuration: Development_Program x64 ------
30>Using bundled DotNet SDK version: 6.0.302
30>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
23>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.Build\obj\Development\net6.0\EpicGames.Build.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.Build\obj\Development\net6.0\EpicGames.Build.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.Build\EpicGames.Build.csproj]
31>Using bundled DotNet SDK version: 6.0.302
31>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
23>EXEC : error : Failed to build UnrealBuildTool.
23>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat -Target="UnrealEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 999.
23>Done building project "UE5.vcxproj" -- FAILED.
32>------ Build started: Project: UnrealPackageTool, Configuration: Development_Program x64 ------
32>Using bundled DotNet SDK version: 6.0.302
32>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
29>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.UHT\obj\Development\net6.0\EpicGames.UHT.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.UHT\obj\Development\net6.0\EpicGames.UHT.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\Shared\EpicGames.UHT\EpicGames.UHT.csproj]
29>EXEC : error : Failed to build UnrealBuildTool.
29>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UnrealVersionSelector Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
29>Done building project "UnrealVersionSelector.vcxproj" -- FAILED.
33>------ Build started: Project: UnrealObjectPtrTool, Configuration: Development_Program x64 ------
33>Using bundled DotNet SDK version: 6.0.302
33>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
28>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\obj\Development\UnrealBuildTool.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\obj\Development\UnrealBuildTool.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
28>EXEC : error : Failed to build UnrealBuildTool.
28>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UnrealVirtualizationTool Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
28>Done building project "UnrealVirtualizationTool.vcxproj" -- FAILED.
34>------ Build started: Project: UnrealMultiUserSlateServer, Configuration: Development_Program x64 ------
34>Using bundled DotNet SDK version: 6.0.302
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'obj\Development\UnrealBuildTool.dll' because it is being used by another process.  [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
30>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" UnrealRecoverySvc Win64 Development -WaitMutex -FromMsBuild
33>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" UnrealObjectPtrTool Win64 Development -WaitMutex -FromMsBuild
31>CSC : error CS2012: Cannot open 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\obj\Development\UnrealBuildTool.dll' for writing -- 'The process cannot access the file 'D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\obj\Development\UnrealBuildTool.dll' because it is being used by another process.' [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>Log file: D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Programs\UnrealBuildTool\Log.txt
31>EXEC : error : Failed to build UnrealBuildTool.
30>Running from a path with a long directory name ("D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion" = 93 characters). Root paths shorter than 50 characters are recommended to avoid exceeding maximum path lengths on Windows.
30>Using 'git status' to determine working set for adaptive non-unity build (D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion).
30>Creating makefile for UnrealRecoverySvc (no existing makefile)
31>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UnrealPak Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
31>Done building project "UnrealPak.vcxproj" -- FAILED.
35>------ Build started: Project: UnrealMultiUserServer, Configuration: Development_Program x64 ------
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 1 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 2 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: "MSBuild.exe (10420), .NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
35>Using bundled DotNet SDK version: 6.0.302
35>Building UnrealBuildTool with Microsoft Visual Studio Community 2022...
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 1 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 2 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 3 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 1 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 2 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>Parsing headers for UnrealRecoverySvc
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 3 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>  Running Internal UnrealHeaderTool UnrealRecoverySvc "D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Intermediate\Build\Win64\UnrealRecoverySvc\Development\UnrealRecoverySvc.uhtmanifest" -WarningsAsErrors
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 4 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>Total of 54 written
30>Reflection code generated for UnrealRecoverySvc in 0.3246928 seconds
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 2 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>Building UnrealRecoverySvc...
30>Using Visual Studio 2019 14.29.30133 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
30>[Upgrade]
30>[Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
30>[Upgrade]     IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
30>[Upgrade] Suppress this message by setting 'IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;' in UnrealRecoverySvc.Target.cs.
30>[Upgrade] Alternatively you can set this to 'EngineIncludeOrderVersion.Latest' to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
30>[Upgrade]
30>Determining max actions to execute in parallel (8 physical cores, 8 logical cores)
30>  Executing up to 8 processes, one per physical core
30>Building 62 actions with 8 processes...
30>[1/62] Resource Default.rc2
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 3 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 4 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 5 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 3 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 4 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>[2/62] Compile MiMalloc.c
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 5 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 6 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 4 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 5 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 6 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 7 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 5 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 6 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 7 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 8 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>[3/62] Compile BuildSettings.cpp
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 6 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>[4/62] Compile Module.TraceLog.cpp
30>[5/62] Compile SharedPCH.Core.ShadowErrors.cpp
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 7 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 8 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 9 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>[6/62] Compile SharedPCH.Core.ShadowErrors.TypeCastErrors.cpp
30>[7/62] Compile Module.Cbor.cpp
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 7 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 8 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 9 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 10 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>[8/62] Compile PCH.Core.cpp
30>[9/62] Compile Module.Networking.cpp
35>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 8 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
34>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 9 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
32>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): warning MSB3026: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Beginning retry 10 in 1000ms. The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
30>[10/62] Compile Module.SQLiteCore.cpp
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): error MSB3027: Could not copy "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". Exceeded retry count of 10. Failed. The file is locked by: ".NET Host (1840), .NET Host (7904)" [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4685,5): error MSB3021: Unable to copy file "obj\Development\UnrealBuildTool.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll". The process cannot access the file '..\..\..\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll' because it is being used by another process. [D:\Study\Certification\Game Experiments\UnrealForkSource\UnrealEngineSourceInitialForkVersion\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
25>EXEC : error : Failed to build UnrealBuildTool.
25>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat BootstrapPackagedGame Win64 Development -WaitMutex -FromMsBuild" exited with code 999.
25>Done building project "BootstrapPackagedGame.vcxproj" -- FAILED.

This could be due to:

  • The file is open in another program or process, such as a text editor or build process.
  • The file is locked by another process, such as a system process or anti-virus software.

To resolve the issue, you can try closing any other programs that might be using the file and temporarily disabling any anti-virus software to see if that fixes the issue. If that doesn’t work, you may need to restart your computer and try building again.

1 Like

Thanks for this input. After I closed antivirus software it built successfully now. Appreciated it.

1 Like

No worries! Glad I could help! :smiley: