Visual Studio not compiling the project

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.

  1. Run a text editor as an administrator.

  2. Open each of the following .csproj files:

    • <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

  3. In each file, find the line for Magick.NET-Q16-HDRI-AnyCPU and change its version from 14.7.0 to 14.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" ... />

  4. 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+).

  1. Run File Explorer as an administrator.

  2. Navigate to your engine’s plugins directory: <EngineDir>\Engine\Plugins\

  3. Permanently delete the folder named VisualStudioTools.

  4. Next, open your project’s .uproject file in a text editor.

  5. 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.

  1. Close Visual Studio.

  2. In your project’s root directory, delete the Binaries, Intermediate, Saved, .vs, and .sln files.

  3. Regenerate your Visual Studio project files.

  4. Open the new .sln file 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!

3 Likes