Forum Discussion

kucint's avatar
kucint
Copper Contributor
Dec 27, 2021

Maui and Grpc cannot work together on MacOS?

Hi,

using asp and maui in a single project results in "unsupported" runtime error message.

Steps to reproduce:

 

  1. create a standard maui project (from template).
  2. 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>
    
  3. add grpc nuget reference to the project
    <PackageReference Include="Grpc.AspNetCore" Version="2.41.0" />
    
  4. 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'.

 

Questions:

  1. why I get this error? Isn't grpc supposed to be independent from maui?
    Grpc itself is supported under Windows, Linux and MacOS.
  2. how to fix it?

 

 

No RepliesBe the first to reply

Resources