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
- [macOS] Editor window is not restored to previous position when launching the Editor and mouse cursor is on a different screen
- Missing Info Icon in Development Build Info Box for Web, Android, Meta, and XR Platforms
- [Usability] Warning message in an Adaptive Probe Volume Component is not informative enough when Realtime Global Illumination is enabled
- Inspector for Adaptive Probe Volumes is not repainted when toggling Realtime Global Illumination setting in the Lighting Window
- Surface Inputs are not rendering when using the custom BaseShaderGUI
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.