Error MSB3073 Code 6

Whenever I try to upgrade a plugin to a new UE version, I get the Error MSB3073 Code 6 in Visual Studio.

I have found some links in this forum, but nothing helped me so far.
Do you have any advise how to get the Build.bat fixed?

Error MSB3073 The command ““C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat” UE52_CPP_ProjectEditor Win64 Development -Project=“C:\Projects\UnrealEngine\UE52_CPP_Project\UE52_CPP_Project.uproject” -WaitMutex -FromMsBuild -architecture=x64” exited with code 6. UE52_CPP_Project C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44

Greetings @CassimoLive

I’d check and see if you need to install any Windows SDK. I had saw this issue before and the user didn’t have any of the Windows SDK options checked in the VS installer.

2 Likes

Thank you for your help. I already have them all installed but no luck.

Maybe it helps someone: I think MSB3073 errors most often are caused by *.cs files.

In my case it helped to

  • create a new clean project
  • basically copy over this *.cs file and modify every part that is the project name (filename + references inside the file)
    ../<ProjectName>/Source/<ProjectName>.Target.cs
  • maybe do the same to:
    ../<ProjectName>/Source/<ProjectName>/<ProjectName>.Build.cs
  • If you write a plugin there is another *.cs file here:
    ../<ProjectName>\Plugins\<PluginName>\Source\<PluginName>\<PluginName>.Build.cs

My situation was that I migrated to a new engine version with my project, in which I’m writing my plugin.