While attempting to Build UE 5.1 from source compile yields many post Build errors. The first of which is received building DatasmithRevit2020. The visual studio output for the project is:
Build started…
1>------ Build started: Project: DatasmithRevit2020, Configuration: Development_Program x64 ------
1>Using bundled DotNet SDK version: 6.0.302
1>Building UnrealBuildTool with Microsoft Visual Studio Enterprise 2022…
1>Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” DatasmithRevit2020 Win64 Development -WaitMutex -FromMsBuild
1>Log file: N:\UEBuilds\UnrealEngine_5\Engine\Programs\UnrealBuildTool\Log.txt
1>Using ‘git status’ to determine working set for adaptive non-unity build (N:\UEBuilds\UnrealEngine_5).
1>Waiting for ‘git status’ command to complete
1>Building DatasmithRevit2020…
1>Using Visual Studio 2019 14.29.30138 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Determining max actions to execute in parallel (6 physical cores, 12 logical cores)
1> Executing up to 6 processes, one per physical core
1>Building 1 action with 1 process…
1>[1/1] cmd Executing post build script (PostBuild-1.bat)
1>) was unexpected at this time.
1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command “…..\Build\BatchFiles\Build.bat DatasmithRevit2020 Win64 Development -WaitMutex -FromMsBuild” exited with code 6.
1>Done building project “DatasmithRevit2020.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Have Visual Studio 2022 set up per instructions at Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.1 Documentation
Have tried completely deleting and re-cloning github repository. Followed this with setup.bat and GenerateProjectFiles.bat.
Is this issue occurring with anyone else. I have found no posts on it. As a sanctity check (and verify visual studio setup) I made a copy of the repo and checked out 5.0.3 and it builds with no issues.
We get the same error as well and can’t track it down. Regenerating the SLN or rerunning change engine version still fails.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""X:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat" ACFUltimateEditor Win64 Development -Project="X:\RabidGames\git\EndlessExperimental\ACFUltimate\ACFUltimate.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "ACFUltimate.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Elapsed 03:17.975 ==========
@GlenAJohnsonJr Do you really want to build DatasmithRevit2020?
There is a bug on our side but here is dev answer:
- If you want to build the revit exporter, you need the
Revit_2020_API
variable to target the Revit SDK folder. - If you do not want to build Revit exporter, that is strange as by default Revit exporter should not be part of the default UE build. But you could just define to an empty folder
Revit_2020_API
such asc:\
If after that you have same problem with subsequent build of revit (2021 etc) you will have to do a similar process.
If you really do not need Revit exporter you can also just remove the projects from solution.
That is a different problem from above,
do you have more details on what is failing?
On UE5-Main and Visual 2022, it is recommended to be on Visual Studio 2022 17.4 (msvc 14.34.31933) or above.
@UE_FlavienP Thank you for your reply. Not entirely sure what was happening here. I had just updated visual studio to 17.4.2 prior to pulling and building UE5.1. When I look at the solution file/configuration manager I can clearly see that DatasmithRevit2020 is not set to build however when selecting the Development Editor config and building the solution all of the Datasmith API projects were attempting to build resulting in numerous failures. When selecting only the projects that are set to build I was able to build UE5.1. Hopefully this doesn’t repeat after repairing visual studio.
I have a same problem. when I update project from 5.0 to 5.1. It’s not depended on Visual Studio version.
I just switch to use UE_5.0\Engine\Build\BatchFiles\Build.bat intent to use UE_5.1\Engine\Build\BatchFiles\Build.bat.
But I found that I cannot package the project (.exe).
Hey there, where is that recommendation written or communicated? That contradicts what’s written in the 5.1 Setup Instructions:
I thought it might be related but it is recommendation only if you build Main from source. Sorry for the confusion.
It is just an internal email that in mid november 2022 the preferred compiler toolchain for UE5-Main was switched to Visual Studio 2022 17.4 (msvc 14.34.31933)… VS2019 is still fully supported…
An error occurred while trying to generate project files.
Running C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles/Build.bat -projectfiles -project=“C:/Users/RADHEY/Documents/Unreal Projects/MyProject8/MyProject8.uproject” -game -rocket -progress
CreateProc failed: The system cannot find the file specified. (0x00000002)
URL: C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles/Build.bat -projectfiles -project=“C:/Users/RADHEY/Documents/Unreal Projects/MyProject8/MyProject8.uproject” -game -rocket -progress
Couldn’t create process ‘C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles/Build.bat’
I get this error while trying to create a new project using c++ in unreal engine.
Can anyone please help me with a solution for this