Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.4
2019.4.13f1
2020.1
2020.2
2021.1
Issue ID
1286853
Regression
No
Project Built with Mono 4.x that contains a precompiled NETStandard 2.0 assembly pulls in System.Windows.Forms.dll
Reproduction steps:
1. Open the attached project "Repro_case.zip"
2. In Project Settings make sure the Scripting Backend is set to Mono and the API compatibility level is .NET 4x
3. Build the Project
Expected result: Project Built with Mono 4.x that contains a precompiled NETStandard 2.0 does not pull in System.Windows.Forms.dll and no warning is outputted
Actual result: Project Built with Mono 4.x that contains a precompiled NETStandard 2.0 assembly pulls in System.Windows.Forms.dll
Reproduces on: 2018.4.30f1, 2019.4.16f1, 2020.1.17f1, 2020.2.0f1, 2021.1.0a9
Notes:
-Issue does not reproduce with IL2CPP Scripting Backend
-Issue does not reproduce when API Compatibility level is set to .NET Standard 2.0
-Issue reproduces with Linux, Windows 10 and macOS
-A sample DLL "Foo.dll" and the "Foo.csproj" used to generate a precompiled NETStandard 2.0 Assembly with no dependencies is attached in the "Repro_case.zip"
-Warning outputted when building the project:
System.Windows.Forms.dll assembly is referenced by user code, but is not supported on StandaloneWindows64 platform. Various failures might follow.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Popup windows spawn on the incorrect monitor when the Editor is placed near the boundary of scaled monitor next to a monitor with different scaling
- Hidden Tabs do not shift into empty space after closing visible Tabs
- [Android] Application not deployed on a device when "activity-alias" is used in the AndroidManifest
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
Resolution Note (2021.2.X):
This issue is due to the netstandard.dll implementation depending on the default .NET Framework assembly structure. This pulls in a variety of dlls and triggers the warning in the Editor. We cannot fix this issue without changing behavior and layout of the .NET assemblies. We won't be fixing the issue at this time but may revisit it in the future as part of a larger .NET upgrade.