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
- Crash on ExtractActiveCasterInfo when navigating the scene view in a project with specific lighting data
- Build Profile name increments when numeric suffix is removed from duplicate Profile name
- "Unrecognized block header in profiler data file, stopping deserialization" error is shown and no more profiler data is recorded when the Player is connected and profiler recording is enabled/disabled few times
- Shader error and warnings thrown when setting HDRP as an Active Target in Blank Shader Graph
- Visual Studio Code does not integrate with the project when the .slnx project is opened
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.