Compilation errors VS2019+UE5EA

Hi dears,

does anyone stumbled upon this errors while trying to compile scripts in Visual Studio 2019? For me this bad boy pops up every time I try to compile any script for UE5 project, even default ones which I have not edited in any way.

Build started…
1>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
1>Project not selected to build for this solution configuration
2>------ Build started: Project: DAOR, Configuration: Development_Editor x64 ------
2>‘“C:\Program Files\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\GetDotnetPath.bat”’ is not recognized as an internal or external command,
2>operable program or batch file.
2>UnrealBuildTool : error : Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘E:\DAO Remaster Assets\DAOR\DAOR’.
2> at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) 2> at System.IO.Enumeration.FileSystemEnumerator1.Init()
2> at System.IO.Enumeration.FileSystemEnumerator1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) 2> at System.IO.Enumeration.FileSystemEnumerable1…ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
2> at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
2> at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
2> at System.IO.DirectoryInfo.EnumerateFiles()
2> at EpicGames.Core.FileUtils.FindCorrectCase(FileInfo Info) in d:\build++UE5\Sync\Engine\Source\Programs\Shared\EpicGames.Core\FileUtils.cs:line 63
2> at UnrealBuildTool.TargetDescriptor.ParseSingleCommandLine(CommandLineArguments Arguments, Boolean bUsePrecompiled, Boolean bSkipRulesCompile, List1 TargetDescriptors) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\TargetDescriptor.cs:line 305 2> at UnrealBuildTool.TargetDescriptor.ParseCommandLine(CommandLineArguments Arguments, Boolean bUsePrecompiled, Boolean bSkipRulesCompile, List1 TargetDescriptors) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\TargetDescriptor.cs:line 218
2> at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 164
2> at UnrealBuildTool.UnrealBuildTool.Main(String ArgumentsArray) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 565
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ““C:\Program Files\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\Build.bat” DAOREditor Win64 Development -Project=“E:\DAO Remaster Assets!DAOR\DAOR\DAOR.uproject” -WaitMutex -FromMsBuild” exited with code 6.
2>Done building project “DAOR.vcxproj” – FAILED.

VS version - 16.11.9 Community.
Unreal Engine version - 5EA (launcher version).

Anyone have any ideas how to fix it?

Thanks in advance.

First thing popped up spurred all the errors. It doesn’t recognize project from the start… How are you creating the project from the start? Are you building the engine from source?

If you’re building from source you’ll need to build the editor configuration before you can open the editor. And then you have to generate your studio files for your project before you build again. If you have no build.cs or target.cs files or they are in the wrong place it’ll just skip the build and spout errors everywhere. They should be in YourProjectName/Source/YourProjectName

Is your project showing beneath all the engine hierarchy before you try building?

  1. No, I downloaded pre-built version of engine from EpicGames launcher.

  2. I create project in UE as shown on screen, then add or edit scripts in VS (go to content browser - C++ classes - new class - ect.).

  1. Files build.cs and target.cs are present in the folder.

  1. Yes, project is showing beneath engine hierarchy.

So… I’ve managed to make it work. All it took is to delete, update and upgrade bloody everything :woman_facepalming:

Algorithm of fixing this mess for everyone, who may encounter those errors:

  1. Delete VS2019 and install VS2022 from here: Visual Studio 2022 Community Edition — бесплатное скачивание последней версии
  2. Download UE5 source code from github and build it following this tutorial: How to Download and Build Unreal Engine 5 from Source - YouTube
  3. Open project in VS2022 and compile scripts.
  4. Open project in UE5 and carry on.

Glad you got it going. Yeah, building from source has some weird stuff going on that doesn’t make sense at times, but that’s programming I guess.