Error compiling the Automation Tool after updating Visual Studio today (Unreal 5.3.2)

After updating Visual Studio today, my Unreal project no longer builds. I am getting compile errors in the Automation Tool and Build Graph.

I created a new project just to test. I followed these steps:

  1. Update to the latest version of Visual Studio 2022 (17.8.0)
  2. Create a new Blank C++ Game with Unreal 5.3.2
  3. Build the solution in Visual Studio.

I get this result:
========== Build: 46 succeeded, 2 failed, 0 up-to-date, 1 skipped ==========
========== Build completed at 10:25 and took 17.625 seconds ==========

The errors are:
5>------ Build started: Project: AutomationScripts.Automation, Configuration: Development Any CPU ------
2>Using bundled DotNet SDK version: 6.0.302
2>Running UnrealBuildTool: dotnet ā€œā€¦..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dllā€ MyProjectEditor Win64 Development -Project=ā€œC:\Brynn\Test\MyProject\MyProject.uprojectā€ -WaitMutex -FromMsBuild
3>C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\AutomationTool\BuildGraph\BgScriptReader.cs(1640,37,1640,42): error CS8604: Possible null reference argument for parameter ā€˜otherā€™ in ā€˜void HashSet.UnionWith(IEnumerable other)ā€™.
3>Done building project ā€œBuildGraph.Automation.csprojā€ ā€“ FAILED.
2>Log file: C:\Users\brynn\AppData\Local\UnrealBuildTool\Log.txt
5>C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\AutomationTool\Scripts\CheckForHacks.cs(87,26,87,45): error CA2017: Number of parameters supplied in the logging message template do not match the number of named placeholders (CA2017: Parameter count mismatch (code analysis) - .NET | Microsoft Learn)
5>Done building project ā€œAutomationScripts.Automation.csprojā€ ā€“ FAILED.

For the BgScriptReader.cs error, it is complaining about a possible null value. I added a null check here.

For CheckForHacks.cs it is complaining about passing format args into a string which has no format specifiers in it. Iā€™ve removed the args to fix this.

Iā€™ve edited the scripts locally to fix the errors, which works to fix the build. But this will be an issue for everyone on the team as we arenā€™t building from source, so those changes Iā€™ve made will not be committed anywhere.

Anyone know why updating VS caused this? My current suspicion is that these are both things that used to be warnings but MS have upgraded to errors, causing the build to failā€¦

22 Likes

Yeah, I have the same problem with Unreal 5.3.2 together with Visual Studio 17.8. It works with older Unreal Engine version and also with older Visual Studio versions but version 5.3.2 together with 17.8 does not build currently.

3 Likes

I was about to post a new topic here but you nailed exactly the issue im having. I converted my project from 5.1.0 to 5.3.2 and its failing to build my project with similar errors. Does anybody know what im missing here? Is the automation tool supposed to be ā€˜builtā€™ as well?

5>D:\UnrealEngine-5.3.2-release\Engine\Source\Programs\AutomationTool\BuildGraph\BgScriptReader.cs(1640,37,1640,42): error CS8604: Possible null reference argument for parameter ā€˜otherā€™ in ā€˜void HashSet.UnionWith(IEnumerable other)ā€™.
5>Done building project ā€œBuildGraph.Automation.csprojā€ ā€“ FAILED.
8>------ Build started: Project: Win.Automation, Configuration: Development Any CPU ------
6>D:\UnrealEngine-5.3.2-release\Engine\Source\Programs\AutomationTool\Scripts\CheckForHacks.cs(87,26,87,45): error CA2017: Number of parameters supplied in the logging message template do not match the number of named placeholders (CA2017: Parameter count mismatch (code analysis) - .NET | Microsoft Learn)
6>Done building project ā€œAutomationScripts.Automation.csprojā€ ā€“ FAILED.
9>------ Build started: Project: Android.Automation, Configuration: Development Any CPU ------
8>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\BuildGraph\ref\BuildGraph.Automation.dllā€™ could not be found
8>Done building project ā€œWin.Automation.csprojā€ ā€“ FAILED.
10>------ Build started: Project: CookedEditor.Automation, Configuration: Development Any CPU ------
2>UE5Rules ā†’ D:\UnrealEngine-5.3.2-release\Engine\Intermediate\Build\BuildRulesProjects\UE5Rules\bin\Development\UE5Rules.dll
2>Done building project ā€œUE5Rules.csprojā€.
11>------ Build started: Project: UE5ProgramRules, Configuration: Development Any CPU ------
9>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Scripts\ref\AutomationScripts.Automation.dllā€™ could not be found
9>Done building project ā€œAndroid.Automation.csprojā€ ā€“ FAILED.
12>------ Build started: Project: Gauntlet.Automation, Configuration: Development Any CPU ------
12>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Platforms\Android\ref\Android.Automation.dllā€™ could not be found
12>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Scripts\ref\AutomationScripts.Automation.dllā€™ could not be found
12>Done building project ā€œGauntlet.Automation.csprojā€ ā€“ FAILED.
10>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Scripts\ref\AutomationScripts.Automation.dllā€™ could not be found
10>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Platforms\Windows\ref\Win.Automation.dllā€™ could not be found
10>Done building project ā€œCookedEditor.Automation.csprojā€ ā€“ FAILED.
13>------ Build started: Project: Turnkey.Automation, Configuration: Development Any CPU ------
14>------ Build started: Project: LowLevelTests.Automation, Configuration: Development Any CPU ------
14>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Scripts\ref\AutomationScripts.Automation.dllā€™ could not be found
14>CSC : error CS0006: Metadata file ā€˜D:\UnrealEngine-5.3.2-release\Engine\Binaries\DotNET\AutomationTool\AutomationScripts\Gauntlet\ref\Gauntlet.Automation.dllā€™ could not be found
14>Done building project ā€œLowLevelTests.Automation.csprojā€ ā€“ FAILED.

Iā€™m running into the same issue since updating yesterday. Not doing any package yet, just doing Build > Build Solution.

Fortunately, Ctrl F5 build at least works - and I did changes to my code that get compiled and work.

BTW - since this VS2022 update, thereā€™s that new dialog:

image

Need to have a closer look at that as well. It produces some warnings, but also seems to require some installation and editorconfig stuff.

2 Likes

Same happening here. Production is in a standstill until this is fixed.

Iā€™ve changed the codes to solve this. I donā€™t know if itā€™s a good idea but compiled successfully.

16 Likes

To fix that error needs to edit file Engine/Source/Programs/AutomationTool/Scripts/CheckForHacks.cs line 87 to:

Logger.LogInformation("Scanning files... [{Arg0}]", FilesToCheck.Count);

https://github.com/EpicGames/UnrealEngine/pull/11110

25 Likes

This is not enough. Also need to fix line 1640 at C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\AutomationTool\BuildGraph\BgScriptReader.cs:

  if (users != null)
  	report.NotifyUsers.UnionWith(users);
14 Likes

So, are you telling me that we have to go fix Epic Gameā€™s code in order to use the engine? thatā€™s simply unacceptable

16 Likes

Very annoying issue. Also not able to build the 5.3 engine with Rider bc of this error:

1 Like

Is this normal? Iā€™m new to UE and only a hobbyist game dev. But working as a backend dev that would be unacceptable. Even in most open source frameworks not even talking about paid stuff.

  1. There is no statement from Epic regarding this issue.
  2. There is an open PR for over a week now and no Hotfix.

I was aware that game dev tooling feels ancient for other developers but this is just different.

1 Like

says page not found

thanks, applying these 2 code fixes worked for me:
https://github.com/EpicGames/UnrealEngine/pull/11110/files

I canā€™t believe I had to change the source code though

2 Likes

same problem . all the links above not working. can someone write the correction here.

Those links you can see right in your Visual Studio - just open error message.

This is UE. Sometimes you have to fix it by your own, but this happens once a year.


Here is the fix for people who canā€™t open the github commits:
2 files to fix BgScriptReader.cs & CheckForHacks.cs


Engine/Source/Programs/AutomationTool/BuildGraph/BgScriptReader.cs
line 1640, replace

report.NotifyUsers.UnionWith(users);

with

if (users != null)
{
report.NotifyUsers.UnionWith(users);
 }
						

Engine/Source/Programs/AutomationTool/Scripts/CheckForHacks.cs
line 87, replace

Logger.LogInformation("Scanning files...", FilesToCheck.Count);

with

Logger.LogInformation("Scanning files... [{Arg0}]", FilesToCheck.Count);

hope that helps!

60 Likes

good to know, thanks!

You need to be logged in on Github and part of the Epic Organization. See this manual on how to get access to the Unreal repository.

1 Like

thanksā€¦i will try it ā€¦