Visual Studio Mac 不支持 .NET MAUI 应用程序

问题描述 投票:0回答:1

当我尝试在 Visual Studio Community 2022 for Mac 上运行 MAUI 项目时,遇到以下错误。

Error: Could not find any available provisioning profiles for ApplicationName on iOS.

我通过删除项目上的 .vs、obj 和 bin 文件夹并按照

this
线程上的建议从
aps-environment
删除 Entitlements.plist 键以及从 Visual Studio 中尝试清理和重建来修复上述错误解决方案。之后,MAUI项目安装在iOS模拟器上,但应用程序无法打开并显示以下警报。

you can't open the application "Application Name" because this application is not supported on this Mac.

截图:

我已将签名证书和配置文件添加到项目中,但之后,我遇到以下错误。

 Error NETSDK1147: To build this project, the following workloads must be installed: maui-ios
To install these workloads, run the following command: dotnet workload restore (NETSDK1147)

这是我第一次在 Mac 上运行 MAUI 应用程序。我安装了最新版本的

Visual Studio for Mac
Xcode
。我还需要安装其他软件才能在 Mac 上正常运行 .NET MAUI 吗?

您能为我提供解决此问题的方案吗?

visual-studio maui
1个回答
0
投票

安装 .net 工作负载后,问题得到解决。

© www.soinside.com 2019 - 2024. All rights reserved.