Quick answer: Resource = exact package name (com.unity.netcode.gameobjects). Expression = SemVer range matching the installed version (e.g. [1.0,99]). Define = the symbol you want. Reimport and check Scripting Define Symbols.
Code wraps a feature in #if NETCODE_INSTALLED. The asmdef Version Define is set up but the symbol never appears in the compile. Likely the Resource or Expression mismatched.
The Symptom
Code under #if SYMBOL never compiles. Other defines work. Editor shows the asmdef Version Define configured.
The Fix
asmdef inspector → Version Defines:
+
Resource: com.unity.netcode.gameobjects // exact package id
Expression: [1.0,99] // SemVer range
Define: NETCODE_INSTALLED
Click Apply. Reimport the asmdef. The Define is now set when the package version matches the Expression.
SemVer Expressions
1.0.0exact.[1.0,2.0)1.0 inclusive to 2.0 exclusive.1.0.0-pre.4with pre-release tags.[1.0,99]“1.0 or any future” for forward compatibility.
Verifying
Edit a file in the asmdef. #if NETCODE_INSTALLED — should highlight as active in IDE. Or Debug.Log("defined"); inside; appears in console at startup.
“Exact package. SemVer range. Define applies.”
Related Issues
For asmdef circular ref, see circular ref. For Burst permutation, see Burst permutation.
Resource exact. Expression matches. Define lives.