Visual Studio 2022 error MSB3073 while trying to do Hello World tutorial

Hi, I was wondering if there is anyone at all who could help with this. I am an absolute beginner who knows literally nothing about coding and I have just started trying to do this tutorial Coder 01 Set Up and Compile a C++ Project in Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community , as well as this setup guide for Visual Studio Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community , I have followed every step to the letter, checked and rechecked, uninstalled and reinstalled, searched everywhere online, but I cannot find an answer. People have apparently came across this before, I have tried the fixes they’ve mentioned but still every time I get to the ‘compile and test your code’, this is what Visual Studio tells me:

Build started at 3:55 PM…
1>------ Build started: Project: AdventureProject, Configuration: Development_Editor x64 ------
1>Using bundled DotNet SDK version: 8.0.412 win-x64
1>Running UnrealBuildTool: dotnet “…\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” AdventureProjectEditor Win64 Development -Project=“G:\Unreal Projects\AdventureGame\AdventureProject\AdventureProject.uproject” -WaitMutex -FromMsBuild -architecture=x64 -WorkingDir=G:\Unreal Projects\AdventureGame\AdventureProject\Intermediate\ProjectFiles -Files=…\Source\AdventureProject\Private\AdventureGameMode.cpp
1>Log file: C:\Users\*****_\AppData\Local\UnrealBuildTool\Log.txt
1>Parsing headers for AdventureProjectEditor
1> Running Internal UnrealHeaderTool “G:\Unreal Projects\AdventureGame\AdventureProject\AdventureProject.uproject” “G:\Unreal Projects\AdventureGame\AdventureProject\Intermediate\Build\Win64\AdventureProjectEditor\Development\AdventureProjectEditor.uhtmanifest” -WarningsAsErrors -installed
1>UHT processed AdventureProjectEditor in 9.6074811 seconds (0 files written)
1>Creating makefile for Projects\AdventureGame\AdventureProject\Intermediate\ProjectFiles (no existing makefile)
1>Couldn’t find target rules file for target ‘Projects\AdventureGame\AdventureProject\Intermediate\ProjectFiles’ in rules assembly ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’
1>
1>Location: C:\Program Files\Epic Games\UE_5.7\Engine\Intermediate\Build\BuildRules\UE5Rules.dll
1>
1>
1>
1>Result: Failed (RulesError)
1>Total execution time: 12.00 seconds
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(70,5): error MSB3073: The command ““C:\Program Files\Epic Games\UE_5.7\Engine\Build\BatchFiles\Build.bat” AdventureProjectEditor Win64 Development -Project=“G:\Unreal Projects\AdventureGame\AdventureProject\AdventureProject.uproject” -WaitMutex -FromMsBuild -architecture=x64 -WorkingDir=G:\Unreal Projects\AdventureGame\AdventureProject\Intermediate\ProjectFiles -Files=…\Source\AdventureProject\Private\AdventureGameMode.cpp” exited with code 8.
1>Done building project “AdventureProject.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 3:55 PM and took 13.300 seconds ==========

I am using UE5.7.3 and Visual Studio 2022 Professional.

Is there any other info needed to figure it out?

So yeah, can someone please help me out? I just wanna make make some games

Thanks in advance.

Hello there @thespunkyyskunk!

First of all, welcome to UE! And don’t worry, we all start somewhere, and that somewhere is usually a pile of erros and a log extract. Now, from your description, your setup looks to be in order, specially if you installed all VS components by following the setup guide.

Next, checking your error log, I think the key line is the following:

1>Couldn’t find target rules file for target ‘Projects\AdventureGame\AdventureProject\Intermediate\ProjectFiles’ in rules assembly ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’

Yet, your actual path is G:\Unreal Projects\AdventureGame\AdventureProject. The error starts at “Projects”, it’s not reading “Unreal”. This is due the space between “Unreal Projects”. As the engine process paths with Windows, any present space could be read as breaks, resulting in UE getting the path all wrong.

To fix this, we need to correct the path, and clean up the project’s cache, in order to get rid of any build fields that still contain the faulty address. To do so, please follow these steps:

  • Close both VS and UE

  • Rename your folder, either remove the space, or add an underscore (you could also reduce it’s lenght, to something like UE_Projects)

  • Go to your project’s main directory, and delete the following folders to clear the cache:

    • .vs (most likely hidden, check “Hidden items” in Windows folder options)
    • Binaries
    • DerivedDataCache
    • Intermediate
  • Also, delete the file for AdventureProject.sln

  • Next, right click on your .uproject file, and select “Generate Visual Studio project files”

  • All project files should be regenerated at this point, including a new .sln. Now, re-open your project, allow it to rebuild, and test it again for errors

Hope this helps, and good luck!

Hey, mate! Thanks for the assist! It’s amazing how something like this can change everything. While there was a few issues after this fix that came up, this was definitely the thing I was missing because as soon as I updated the path more things started right and got me closer to figuring it out.

Thanks again!

1 Like