检查 Mono 安装时,Visual Studio 2022 与 Mac 配对失败

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

早上好,

我正在努力扩展我在 IOS 应用程序开发方面的经验。

因此,我创建了一个 .NET MAUI 解决方案,并将我的 Windows 10 计算机与 VS Pro 2022 17.4.2 和我的 MacBook macOS 12.6.1 21G217、Xcode Ver. 进行配对。 14.1 (14B47b) 开始。

这在出现短暂的 SSH 密钥问题后立即起作用。

现在我有一个需要连接 MacBook 的项目,我必须先让我儿子上床睡觉。所以我把一切都留在连接状态并处理它。

四个小时后,我回到工作地点,发现连接断开了。没问题,我心想,又开始配对了。从那时起它就不再起作用了。建立连接后,会出现以下消息:

所以我一直在谷歌上徘徊,希望找到解决方案。现在,如果我找到了合适的东西,我可能就不会站在这里询问专业人士了;-)

到目前为止我尝试过什么?

  • 重启展位机器
  • 在解决方案中,我删除了以下解决方案目录:.vs、bin、obj <-- That didn't help.
  • 在 Windows 上删除目录
    %LOCALAPPDATA%\Temp\Xamarin\XMA
  • 删除 Mac 上的目录
    $HOME/Library/Caches/Xamarin/XMA
  • 删除 Mac 上的目录
    $HOME/Library/Logs/Xamarin-*
    <-- Since the connection to the Mac can no longer be established, no Xamarin log is written to the Mac
  • 使用“devenv.exe /log”启动 VS 2022 <-- See following screenshot

VS 2022 Xamarin 日志的结果:

我有一条记录,MacBook 上的 IDBAgent 得到了一些东西。因为

~/Library/Logs/Xamarin.Messaging-17.4.0.301/2022-12-07__20-46-20.IDB.log
中的最后几行是:

Xamarin.Messaging.IDB.ListenerProvider Information: 0 : Sending devices: iPhone SE (3rd generation) iOS 16.1, iPhone 14 iOS 16.1, iPhone 14 Plus iOS 16.1, iPhone 14 Pro iOS 16.1, iPhone 14 Pro Max iOS 16.1, iPad Air (5th generation) iOS 16.1, iPad (10th generation) iOS 16.1, iPad mini(6th generation) iOS 16.1, iPad Pro (11-inch) (4th generation) iOS 16.1, iPad Pro (12.9-inch) (6th generation) iOS 16.1, Apple TV tvOS 16.1, Apple TV 4K (3rd generation) tvOS 16.1, Apple TV 4K (3rd generation) (at 1080p) tvOS 16.1, Apple Watch Series 5 (40mm) watchOS 9.1, Apple Watch Series 5 (40mm) watchOS 9.1, Apple Watch Series 5 (40mm) watchOS 9.1, Apple Watch Series 5 (44mm) watchOS 9.1, Apple Watch Series 5 (44mm) watchOS 9.1, Apple Watch Series 5 (44mm) watchOS 9.1, Apple Watch Series 6 (40mm) watchOS 9.1, Apple Watch Series 6 (40mm) watchOS 9.1, Apple WatchSeries 6 (40mm) watchOS 9.1, Apple Watch Series 6 (44mm) watchOS 9.1, Apple Watch Series 6 (44mm) watchOS 9.1, Apple Watch Series 6 (44mm) watchOS 9.1, Apple Watch Series 7 (41mm) watchOS 9.1, Apple Watch Series 7 (41mm) watchOS 9.1, Apple Watch Series 7 (41mm) watchOS 9.1, Apple Watch Series 7 (45mm) watchOS 9.1, Apple Watch Series 7 (45mm) watchOS 9.1, Apple Watch Series 7 (45mm) watchOS 9.1, Apple Watch SE (40mm) (2nd generation) watchOS 9.1, Apple Watch SE (40mm) (2nd generation) watchOS 9.1, Apple Watch SE (40mm) (2nd generation) watchOS 9.1, Apple Watch SE (44mm) (2nd generation) watchOS 9.1, Apple Watch SE (44mm) (2nd generation) watchOS 9.1, Apple Watch SE (44mm) (2nd generation) watchOS 9.1, Apple Watch Series 8 (41mm) watchOS 9.1, Apple Watch Series 8 (41mm) watchOS 9.1, Apple Watch Series 8 (41mm) watchOS 9.1, Apple Watch Series 8 (45mm) watchOS 9.1, Apple Watch Series 8 (45mm) watchOS 9.1, Apple Watch Series 8 (45mm) watchOS 9.1, Apple Watch Ultra (49mm) watchOS 9.1, Apple Watch Ultra (49mm) watchOS 9.1, Apple Watch Ultra (49mm) watchOS 9.1: 12/07/2022 19:53:57Z
    DateTime=2022-12-07T19:53:57.2611150Z: 12/07/2022 19:53:57Z
System.Net.Mqtt.Sdk.Bindings.TcpChannel Warning: 0 : The underlying communication stream has completed sending bytes. The observable sequence will be completed and the channel will be disposed: 12/07/2022 19:57:48Z
    DateTime=2022-12-07T19:57:48.2045710Z: 12/07/2022 19:57:48Z
System.Net.Mqtt.Sdk.ClientPacketListener Warning: 0 : Client IDB1740301 - Packet Channel observable sequence has been completed: 12/07/2022 19:57:48Z
    DateTime=2022-12-07T19:57:48.2058850Z: 12/07/2022 19:57:48Z
System.Net.Mqtt.Sdk.MqttClientImpl Warning: 0 : Client - Packet observable sequence has been completed, hence closing the channel: 12/07/2022 19:57:48Z
    DateTime=2022-12-07T19:57:48.2061660Z: 12/07/2022 19:57:48Z
Xamarin.Messaging.Client.AgentConsoleRunner{Xamarin.Messaging.IDB.IDBAgent} Warning: 0 : The connection to the Broker has been lost, the Agent should terminate: 12/07/2022 19:57:48Z
    DateTime=2022-12-07T19:57:48.2338830Z: 12/07/2022 19:57:48Z
Xamarin.Messaging.IDB.IDBAgent Information: 0 : Stopping: IDB: 12/07/2022 19:57:48Z
    DateTime=2022-12-07T19:57:48.2357010Z: 12/07/2022 19:57:48Z
Xamarin.Messaging.IDB.IDBAgent Information: 0 : Killing existing MTouch processes before stopping the agent: 12/07/2022 19:57:48Z
    DateTime=2022-12-07T19:57:48.2361030Z: 12/07/2022 19:57:48Z

现在我不知道如何继续。有谁知道如何检查IDBAgent是否在Mac上运行或如何启动它?

或者有人知道我哄孩子睡觉时发生了什么吗?

我很感激每一个提示。

ios visual-studio xamarin maui pairing
3个回答
2
投票

要解决配对问题,您需要清除 Mac 上的 Broker、IDB、Build 和 Designer Agent。请按照以下步骤操作:

  1. 在 Mac 上的终端中运行以下命令:
open "$HOME/Library/Caches/Xamarin"
  1. 按住 Control 键单击

    XMA
    文件夹,然后选择移至废纸篓。

  2. Windows 上也有缓存,可能有助于清除。在 Windows 上以管理员身份打开 cmd 提示符:

del %localappdata%\Temp\Xamarin\XMA

完成上述步骤后,请再次尝试与Mac配对。更多详细信息,您可以参考清除Mac上的Broker、IDB、Build和Designer Agent


1
投票

这是服务器端引起的问题,我们已经解决了。您现在应该能够再次连接!


0
投票

我遇到了与 OP 相同的问题,并在我的 Mac 上的 Xamarin.Messaging 日志中看到相同的条目。在OP提到的相同修复尝试中,我也有:

  • 将 MacBook 完全重置为操作系统(2022 M2、Sonoma 14.4.1)
  • 重新安装 XCode (15.3)
  • 完全卸载 Visual Studio 并重新安装。 社区 2022(64 位)- 当前 版本17.9.6
  • 创建了一个普通的 MAUI 应用程序。

连接到 Mac 曾经工作正常,然后突然停止工作。它只是挂起检查 Mono 安装,直到超时并报告“对象引用未设置为对象实例”错误。

$HOME/Library/Caches/Xamarin 保持为空,即未重新创建 XMA 文件夹。

任何进一步的线索表示赞赏。

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