Bug description
Honestly, I don't know what causes it and how to reproduce it on a simple example. But I see lots of such messages once I try to upgrade to MessagePack v3:

Full error message:
CSC: Warning CS8785 : Generator 'MessagePackGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Operation is not valid due to the current state of the object.'
Repro steps
- Checkout this branch: https://github.com/ActualLab/Fusion/tree/feat/messagepack3
- Try to compile it (
dotnet build)
It produces warnings for a bunch of projects, but ActualLab.Core is the least dependent one, so maybe it makes sense to look at [MessagePackObject] types there first...
Expected behavior
No analyzer failures?
Actual behavior
Analyzer failures.
- Version used:
- Runtime: .NET 9