Packaging failed due to system.drawing.common?

I’ve been trying to package my game for testing but it always fails with the error:

“ ‘system.drawing.common’ 4.7.0 has a known critical severity vulnerability”.

I’ve “repaired” visual studio, I’ve uninstalled and reinstalled UE5.2, and still no change. When I Google system.drawing.common nothing makes sense. It looks like it’s part of the .Net framework? But it also looks like my latest version of .Net is far past 4.7. How do I fix this?

1 Like

Hello,

I had the same problem and found the solution. This is an issue specifically with that version, I don’t know if it was fixed in UE 5.3.

How to fix it ?

You need to manually change the lines containing the System.Drawing.Common version in the unreal engine source code.

For each of the needed files, search for the line below

<PackageReference Include="System.Drawing.Common" Version="4.7.0" />

And modify the version to 4.7.2

<PackageReference Include="System.Drawing.Common" Version="4.7.2" />

What files do you need to modify ?

The following paths start at the root of the engine source code (Epic Games/UE_*version*/)

Mandatory files

/Engine/Source/Programs/AutomationTool/BuildGraph/BuildGraph.Automation.csproj
/Engine/Source/Programs/AutomationTool/Scripts/AutomationScripts.Automation.csproj
/Engine/Source/Programs/AutomationTool/AutomationUtils/AutomationUtils.Automation.csproj

Variable files
Among the following files, only modify the ones relevant to your targetted platform, as your project may not need the other ones

/Engine/Source/Programs/AutomationTool/IOS/IOS.Automation.csproj
/Engine/Source/Programs/AutomationTool/Linux/Linux.Automation.csproj
/Engine/Source/Programs/AutomationTool/Mac/Mac.Automation.csproj
/Engine/Source/Programs/AutomationTool/SteamDeck/SteamDeck.Automation.csproj
/Engine/Source/Programs/AutomationTool/TurnKey/TurnKey.Automation.csproj
/Engine/Source/Programs/AutomationTool/TVOS/TVOS.Automation.csproj
/Engine/Source/Programs/AutomationTool/Win/Win.Automation.csproj

The last step

You can now recompile the project, either via the .uproject or the RunUAT file and it should work.

3 Likes

Awesome! This solution fixed the issue for me.

Thank you so much! That probably would’ve worked, but in my case it actually turned out to be a plugin issue. The plugin’s use of .Net was conflicting with my computer’s somehow. Anyways, the plugin owner corrected it and it all started working again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.