Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2019.4.X, 2020.3.X, 2021.2.X
Votes
1
Found in
2018.4
2019.4
2020.3
2020.3.4f1
2021.1
2021.2
Issue ID
1331829
Regression
No
Class get stripped when using Preserve attribute with Mono backend
How to reproduce:
1. Open the attached "xmlDeserializationTest.zip" project
2. Check if scripting backend is set to "Mono", and ManagedStrippingLevel to "low"
3. Build and run "SampleScene" Scene on Standalone
Expected result: Class does not get stripped when using Preserve attribute
Actual result: Class gets stripped when using Preserve attribute
Error shown in the console:
"MissingMethodException: Default constructor not found for type System.Diagnostics.SystemDiagnosticsSection"
Reproducible with: 2018.4.35f1, 2019.4.27f1, 2020.3.10f1, 2021.1.8f1, 2021.2.0a18
Notes:
- The issue does not occur in Editor
- The issue does not occur when using the IL2CPP scripting backend
-
Arkade
Oct 18, 2021 11:13
What's the timeline for fixing this in 2020 LTS, please?
-
ImpossibleRobert
Oct 10, 2021 08:44
Have the issue now in 2021.1. When will a fix for 2021.1 be available?
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a7
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0b8
Resolution Note (fix version 2020.3):
Fixed in: 2020.3.27f1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.38f1