Compliation error when switching to debug mode after upgrading to Unity 6

UPDATE Fixed by adding an assembly reference to Unity.Collections in one of my assembly definitions. I’m not sure why this error only occurred when attempting to debug though.

When click the debugger button in the bottom right of the screen, I get the following error:

error CS0012: The type 'FixedList64Bytes<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

More details from the Editor log file:

##### ExitCode
1
##### Output
error CS0012: The type 'FixedList64Bytes<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
*** Tundra build failed (62.93 seconds - 0:01:02), 2693 items updated, 3028 evaluated
## Script Compilation Error for: Csc Library/Bee/artifacts/1900b0aEDbg.dag/Salt.UnityServices.dll (+2 others)
## CmdLine: "E:\Programs\Unity\6000.0.30f1\Editor\Data\NetCoreRuntime\dotnet.exe" exec "E:/Programs/Unity/6000.0.30f1/Editor/Data/DotNetSdkRoslyn/csc.dll" /nostdlib /noconfig /shared "@Library/Bee/artifacts/1900b0aEDbg.dag/Salt.UnityServices.rsp" "@Library/Bee/artifacts/1900b0aEDbg.dag/Salt.UnityServices.rsp2"
## Output:
error CS0012: The type 'FixedList64Bytes<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
  • This began happening after I upgraded my project from 2022.3 to 6.
  • I have the Collections 2.5.1 package installed.
  • I have tried deleting and reimporting my library and obj folders and all .csproj files.
  • Once I click the debugger button and receive this error for the first time, I can’t enter play mode (due to compilation error) until I either restart Unity or recompile by making a code change.
  • This does not occur on a fresh unity project.
  • Updated to the latest unity services package.

Any ideas on how to resolve this issue so that I can use the debugger again?


ref this asmdef to your asmdef :))
if you understand asmdef you will get what i mean.