Cysharp / MagicOnion

Unified Realtime/API framework for .NET platform and Unity.
MIT License
3.68k stars 417 forks source link

Error CS0234 The type or namespace name 'MagicOnion' does not exist in the namespace 'MessagePack.Formatters' (are you missing an assembly reference?) #792

Open aleh4d opened 1 week ago

aleh4d commented 1 week ago

I got the following error when compiling client-side of StreamingHubClient sample (.net 8.0) Error CS0234 The type or namespace name 'MagicOnion' does not exist in the namespace 'MessagePack.Formatters' (are you missing an assembly reference?)

mayuki commented 1 week ago

What source code does the error occur in? In the code you wrote or in the code generated by the Source Generator?

aleh4d commented 1 week ago

looks like it is in code generated by source generator, the error is in file MOClient_MagicOnionGeneratedClientInitializer_MessagePack.g.cs

mayuki commented 1 week ago

The source generator is intended to be used in combination with MessagePack's mpc (code generator). Are you using mpc in your project?

aleh4d commented 1 week ago

explicitly not, but I need client part to run on Android (Avalonia), ant that may be strictly Ahead Of Time environment, so Message Pack Compiler may kick in?

Message Pack packages that I have installed: image