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

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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.