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
- Asset thumbnails in the Project window stay white when a referenced texture file is deleted and restored
- Crash on PersistentManager::ReadObjectThreaded when calling AssetDatabase.ForceReserializeAssets() multiple times in a row
- Scene becomes dirty when first opening an HDRP Template project
- Ping highlight text is misaligned with asset name when pinging a prefab from Prefab Mode to Project window
- Crash on CheckDeviceStatus when selecting GameObjects in the scene view while using DX12
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.