Search Issue Tracker
By Design
Votes
0
Found in
2020.3.38f1
2021.3.8f1
2022.1.14f1
2022.2.0b6
2023.1.0a9
Issue ID
UUM-12873
Regression
No
NET_STANDARD_2_1, NET_STANDARD_2_0 are not defined when asmdef targets Editor only
Reproduction steps:
1. Open the attached project “IN-6270.zip”
2. Enter Play Mode
3. Exit Play Mode
4. Observe Console Window
5. In the Project Window, Click “Assets/Test.asmdef”
6. In the Inspector window, under Platforms click “Deselect all”
7. Check only “Editor”
8. Enter Play Mode
9. Observe Console Window
Expected result: NET_STANDARD_2_1, NET_STANDARD_2_0 are defined and script files compile
Actual result: NET_STANDARD_2_1, NET_STANDARD_2_0 are not defined and script files do not compile
Reproducible with: 2020.3.38f1, 2021.3.8f1, 2022.1.14f1, 2022.2.0b6, 2023.1.0a9
Reproducible on: Windows 10 Pro 21H2
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
This behavior is actually by design: for backward compatibility reason, editor-only assemblies are always compiled referencing the .net FX profile, not the .net standard one.
We are planning to change that, but it is a breaking change, thus we wont do that for existing versions.