0

I have a MAUI project that references 3 .dll's that are built with netstandard2.1. I am working on a Mac with Ventura MacOS and Visual Studio 2022 17.4.2. I am having a problem building the .ipa for the iOS platform. I can compile all of the elements of the project but when I run the command

"dotnet publish -f:net6.0-ios -c:Release /p:ArchiveOnBuild=true -r:ios-arm64 --no-self-contained"

I get 3 errors all related to the .dll project files not referencing .net6.0-ios.

/usr/local/share/dotnet/sdk/6.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(267,5): error NETSDK1005: Assets file '/Users/davidrutter/Projects/RadixIQDealerPortal/aspnet-core/src/RadixDealerPortal.HttpApi.Client/obj/project.assets.json' doesn't have a target for 'net6.0-ios'.

I've tried several things and searched all over trying to find a solution but without success. If anyone has an idea how to resolve this I would be truly appreciative.

Bas H
  • 2,114
  • 10
  • 14
  • 23

1 Answers1

0

You want to use the framework net6.0, net6.0-ios should not make a difference here as you are using --no-self-contained. Leaving the options for net6.0-ios out should work too, as you already have the runtime defined.

TLDR;

remove -f:net6.0-ios

b2f
  • 196
  • 2
  • 10
  • The only way the publish will work by removing -f:net6.0-ios is if I make net6.0-ios the only framework in the tag. I did that, but now when I run the publish command I get the following error: error : Empty ResolveFrameworkReference.RuntimePackPath while trying to read runtime components manifest. ResolvedFrameworkReference available: { Microsoft.NETCore.App, RuntimePackPath: } – David Rutter Jan 18 '23 at 14:02
  • Could you try a more basic publishing `dotnet publish -f net6.0-ios -c Release` or even `dotnet publish -c Release` – b2f Jan 21 '23 at 11:06
  • Oh you will need /p:ArchiveOnBuild too. https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/overview?view=net-maui-7.0 – b2f Jan 21 '23 at 11:16