I'm getting these two errors repeatedly from my generated resolver script:
Assets\Project\Plugins\Models\MessagePackGenerated.cs(8351,13): error CS0012: The type 'ReadOnlySequence<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
Assets\Project\Plugins\Models\MessagePackGenerated.cs(8512,13): error CS0012: The type 'ReadOnlySpan<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
dotnet mpc toolScripts compile successfully
Hundreds of errors, which are just the two errors repeating over and over again (for each instance of writer.Write in the generated resolver)
Worth nothing that I also commented out the using System.Buffers; parts of the generated resolver code since they were causing this issue:
Assets\Project\Plugins\Models\MessagePackGenerated.cs(481,18): error CS0234: The type or namespace name 'Buffers' does not exist in the namespace 'System' (are you missing an assembly reference?)
but I'm not sure if I should've done that
Why not solve it by adding the assembly reference that it's asking for?
Both System.Buffers and System.Memory DLL are already included in the Unity package (I guess I wasn't clear on that, I'll edit the original repro steps), which is why I'm wondering why they're not being detected. They're also part of the MessagePack asmdef, I'm not sure if that has something to do with it.
I also so a similar issue before with the System.Buffers DLL and having to remove the "using System.Buffers" statements in the pregenerated code, but that just introduced more errors for me.
Here are pictures from the Unity setup.



Okay it looks like an issue that's specific to my project. I tried it on a fresh install and there are no errors. I'll try to find out the cause of the conflict, and then close this issue once I have the information (in case it helps other people).
Closing this, sorry for the false alarm. The issue was that the generated resolver was being generated in the wrong csproj.