Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2021.3.X, 2022.1.X

Votes

0

Found in

2021.2

2021.2.0f1

2022.1

2022.2

Issue ID

1376513

Regression

No

IL2CPP build fails when project includes System.Drawing.Common.dll

IL2CPP

-

How to reproduce:
1. Open the attached “SystemDrawingBug.zip” project
2. Build with IL2CPP Scripting Backend

Expected result: Build is successful
Actual result: Build fails with IL2CPP error in the Console

Reproducible with: 2021.2.0b6, 2021.2.8f1, 2022.1.0b3, 2022.2.0a1
Could not test with: 2019.4.34f1, 2020.3.26f1, 2021.2.0b5 (User’s DLL uses .NET 2.1 and this causes errors in the Console)

Notes:
- Does not reproduce with Mono Scripting Backend

Short error:

Error: IL2CPP error for method 'System.Byte System.Drawing.Color::get_R()' in assembly
System.ArgumentException: An item with the same key has already been added. Key: Color_get_R_m81F7E12D9A991BBEB6C34EEF1FD00D2E1C5569D8_MetadataUsageId

  1. Resolution Note (fix version 2022.2):

    Fixed in 2022.2.0a5

  2. Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0b14

  3. Resolution Note (fix version 2021.3):

    Fixed in 2021.3.1f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.