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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.