Search Issue Tracker

Won't Fix

Votes

1

Found in

2019.4.4f1

Issue ID

1265511

Regression

No

.net 4.0 runtime on macOS is missing system libraries

Mono

-

Opening the attached project on macOS using Api Compatibility .Net 4.x I get a number of system.drawing errors. It seems that Unity cannot find the system.drawing namespace.

API Compatibility .net 4.x works fine when using Windows. On macOS, if you switch to . net 2.x it works as expected.

Steps to reproduce
- Open the attached project on macOS 10.15.6
Notice issue >> Packages/Release-Test-Tools/Tests/Tools/Emgu.CV/Assets/Scripts/Emgu.CV.Contrib/Aruco/ArucoInvoke.cs(224,94): error CS1069: The type name 'Size' could not be found in the namespace 'System.Drawing'. This type has been forwarded to assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.

- Open build settings switch to .net 2.0
Notice issue >> works as expected.

Tested Broken: macOS .net 4.0 Unity 2019.4.0f1, 2019.4.4f1, 2019.3.3f1, 2020.1.0f1
Tested Working: macOS .net 2.0, Windows .net 2.0, .net 4.0. Unity 2019.4.0f1, 2019.4.4f1

  1. Resolution Note:

    We generally discourage use of System.Drawing as it is not portable and doesn't work on all our platforms. This issue is a corner case of us not referencing it by default. At this point I would prefer if you add a reference to System.Drawing.dll manually by adding a switch '-r:System.Drawing.dll' to a csc.rsp file in your project.

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.