Cysharp / MagicOnion

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

Console app probem: PlatformNotSupportedException #742

Open mariorancic01 opened 3 months ago

mariorancic01 commented 3 months ago

I was using services very successfully in Wpf app, now when i need to use the same client in my console app i got exception : The type initializer for 'MagicOnion.Client.DynamicClient.DynamicClientBuilder`1' threw an exception.' PlatformNotSupportedException: Dynamic code generation is not supported on this platform.

Here is the same code i used in WPF APP: var channel = GrpcChannel.ForAddress("myAddress"); var proxy = MagicOnionClient.Create(channel)!;

mariorancic01 commented 3 months ago

i found solution to my own problem. I just needed to set PublishAot parameter to false instead of true