Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Jun 18, 2024 · 4 comments

Comments

@aleh4d
Copy link

aleh4d commented Jun 18, 2024

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?)

  • I checked all packages in project, what is missing?

    PackageReference Include="MagicOnion.Abstractions" Version="6.1.3"
    PackageReference Include="MagicOnion.Client" Version="6.1.3"
    PackageReference Include="MagicOnion.Serialization.MessagePack" Version="6.1.3"
    PackageReference Include="MagicOnion.Shared" Version="6.1.3"

@mayuki
Copy link
Member

mayuki commented Jun 19, 2024

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

@aleh4d
Copy link
Author

aleh4d commented Jun 19, 2024

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

@mayuki
Copy link
Member

mayuki commented Jun 20, 2024

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

@aleh4d
Copy link
Author

aleh4d commented Jun 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants