【问题标题】:Maui build and publication issuesMaui 构建和发布问题
【发布时间】:2023-01-18 01:09:13
【问题描述】:

我有一个 MAUI 项目,它引用了 3 个使用 netstandard2.1 构建的 .dll。我正在使用装有 Ventura MacOS 和 Visual Studio 2022 17.4.2 的 Mac。我在为 iOS 平台构建 .ipa 时遇到问题。我可以编译项目的所有元素,但是当我运行命令“dotnet publish -f:net6.0-ios -c:Release /p:ArchiveOnBuild=true -r:ios-arm64 --no-self-contained “我收到 3 个错误,所有这些错误都与未引用 .net6.0-ios 的 .dll 项目文件有关。

/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'.

我已经尝试了几件事并到处搜索试图找到解决方案但没有成功。如果有人知道如何解决这个问题,我将不胜感激。

【问题讨论】:

    标签: maui visual-studio-mac-2022


    【解决方案1】:

    你想使用 net6.0 框架,net6.0-ios 在这里应该没有什么区别,因为你正在使用 --no-self-contained。 保留 net6.0-ios 的选项也应该有效,因为您已经定义了运行时。

    TLDR;

    删除-f:net6.0-ios

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-23
      • 2018-08-31
      • 2022-09-25
      • 2021-01-04
      • 2019-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多