Search Issue Tracker
By Design
Votes
2
Found in
2021.3.35f1
2022.3.20f1
2023.2.11f1
2023.3.0b8
Issue ID
UUM-64526
Regression
No
Error in the Console when classes are moved to another assembly
How to reproduce:
1. Open the attached “reproprojectCS.zip“ project
Expected result: No error in the Console
Actual result: “error CS7069: Reference to type 'Span<>' claims it is defined in 'mscorlib', but it could not be found“ error in the Console
Reproducible with: 2021.3.35f1, 2022.3.20f1, 2023.2.11f1, 2023.3.0b8
Reproducible on: macOS 14.2.1 Sonoma (Intel)
Not reproducible on: No other environment tested
Note: The user noted that compilation succeeds when replicating the assemblies and classes in normal .NET Standard 2.1 projects outside of Unity
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
- Text Styles are not applied to Underline and Strikethrough when TextMeshPro text without tags is used
- Scene View selection is broken when there are multiple GameObjects that draw Gizmos
- Random Number Operator in a child System only has set limited seeds for particle spawning in a visual effect when entering the Play Mode
- Blender FBX file import triggering incorrect errors
- Overlay UI opaque colors are shown incorrectly in the Player when a HDR display and Linear Color Space are used
Resolution Note:
The reason this is happening is because the Lib3 are Referencing Lib2.
Lib2 are compiled with .net framework as its an "Editor" Assembly. .net framework can reference .net standard in this case, so if you switch the References the problem should go away.
In 2023 there was an option added to change the Editor assemblies to be compiled with net standard, this is also an option to solve the issue.