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
- 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:
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.