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
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
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.