Hey everyone,
Just wanted to add a follow-up to this thread for anyone who is running into this build failure on UE 5.6 but wants to stay on the latest .NET 8 toolchain without downgrading to .NET 6.
The accepted solution of using .NET 6 is a great workaround, but I found that the root cause is actually two separate issues: a vulnerable NuGet package (Magick.NET) and the obsolete VisualStudioTools plugin. By fixing those directly, you can get a clean build on the latest version of Visual Studio 2022.
Here is the definitive step-by-step guide that worked for me:
Part 1: Fix the Magick.NET Vulnerability Error This is the root cause of the C# toolchain failure. The solution is to manually update the package version in three of the engine’s project files.
-
Run a text editor as an administrator.
-
Open each of the following
.csprojfiles:-
<EngineDir>\Engine\Source\Programs\AutomationTool\AutomationUtils\AutomationUtils.Automation.csproj -
<EngineDir>\Engine\Source\Programs\AutomationTool\AutomationTool.csproj -
<EngineDir>\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj
-
-
In each file, find the line for
Magick.NET-Q16-HDRI-AnyCPUand change its version from14.7.0to14.8.1.-
Change This:
<PackageReference Include="Magick.NET-Q16-HDRI-AnyCPU" Version="14.7.0" ... /> -
To This:
<PackageReference Include="Magick.NET-Q16-HDRI-AnyCPU" Version="14.8.1" ... />
-
-
Save all three files.
Part 2: Fix the VisualStudioTools RulesError This error is caused by an obsolete plugin that conflicts with modern VS 2022 versions (17.9+).
-
Run File Explorer as an administrator.
-
Navigate to your engine’s plugins directory:
<EngineDir>\Engine\Plugins\ -
Permanently delete the folder named
VisualStudioTools. -
Next, open your project’s
.uprojectfile in a text editor. -
Find the
"Plugins"section and delete the entire block for"VisualStudioTools".
The Mandatory Final Step: Clean and Rebuild These changes will not take effect until you perform a full clean and rebuild.
-
Close Visual Studio.
-
In your project’s root directory, delete the
Binaries,Intermediate,Saved,.vs, and.slnfiles. -
Regenerate your Visual Studio project files.
-
Open the new
.slnfile and build the solution.
This solved the issue for me and allowed me to keep my entire development environment up-to-date. Hope this helps someone else!