using asp and maui in a single project results in "unsupported" runtime error message.
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 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'.
- 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?