Maui and Grpc cannot work together on MacOS?
See original GitHub issueDescription
Hi, using asp and maui in a single project results in “unsupported” runtime error message.
Questions:
- why I get this error? Isn’t grpc supposed to be independent from maui? Grpc itself is supported under Windows, Linux and MacOS.
- how to fix it?
I have created similar issue on Community Hub long time ago, no answer till now: https://techcommunity.microsoft.com/t5/app-development/maui-and-grpc-cannot-work-together-on-macos/m-p/3046251
Steps to Reproduce
- create a standard maui project (from template).
- remove iOS and Android from TargetFrameworks. Only windows and MacCatalyst shall stay (I want to build a cross platform desktop app).
<TargetFrameworks>net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
- add grpc nuget reference to the project
<PackageReference Include="Grpc.AspNetCore" Version="2.41.0" />
- build the project. Following error will be displayed: 1>C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(427,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier ‘maccatalyst-x64’.
Version with bug
Release Candidate 1 (current)
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
MacCatalyst
Did you find any workaround?
no
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Maui and Grpc cannot work together on MacOS?
Maui and Grpc cannot work together on MacOS? Hi,. using asp and maui in a single project results in "unsupported" runtime error message....
Read more >Tutorial: Create a gRPC client and server in ASP.NET Core
This tutorial shows how to create a gRPC Service and gRPC client on ASP. ... macOS doesn't support ASP. ... NET Core gRPC...
Read more >how i can Drop Files Into maui app from desktop?
The Open Maui issue for this: github.com/dotnet/maui/issues/6080. There is no workaround listed. Therefore, this cannot be done at this time ...
Read more >Microsoft doesn't care about publishing MAUI macOS apps ...
I built an open source MAUI Blazor app and I made it work on Web browser, Windows, Linux, Android, iOS and macOS: ...
Read more >Taking .NET MAUI for a spin - Jon Skeet's coding blog
I've been keeping an eye on MAUI - the .NET Multi-platform App UI - for a while, but I've only recently actually given...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Falco20019 I have built a test application from scratch, that simulates my problem. I have to admit that the problem is gone (at least partially).
Anyway, I have a “work around” that functions. Now I have to find why my production app fails and where the undesired reference comes from.
Thanks for your very appreciated help! Best.
@Falco20019 the runtime pack that is chosen depends on what runtime the code ends up running on. I do think that net6.0-maccatalyst is different from net6.0-macos, so if something is compatible with ‘macos’ then it won’t automatically run on ‘maccatalyst’.