【问题标题】:VS 2015 Xamarin - Can't use iOS storyboard designer after running in debug/simulatorVS 2015 Xamarin - 在调试/模拟器中运行后无法使用 iOS 故事板设计器
【发布时间】:2016-12-27 22:43:41
【问题描述】:

我开始了一个新的、空的 Xamarin iOS 项目。当我编辑 Main.storyboard 时,设计器弹出,没问题。但是一旦我运行 iOS 模拟器,我就不能再无错误地编辑情节提要了。如果我停止调试,从模拟器中分离,关闭情节提要并重新打开都没关系;我必须完全关闭 Visual Studio (2015) 并重新打开解决方案,以便让情节提要设计器进行渲染,以便我可以使用它。

我在稳定的分支上。有任何想法吗?这是我得到的错误:

错误:EnsureSession(计数器 1):MonoTouch.Design.Client.InvalidSessionException:会话无效 在 MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) 在 MonoTouch.Design.Client.ServerProcessConnection.PostXml(DesignSession 会话,String xml,String[] viewsToHide) 在 MonoTouch.Design.Client.ServerProcessConnection.PostXml(DesignSession 会话,XElement fullStoryboard,XElement[] partialElements,布尔 freezeMisplacements,String[] viewsToHide) 在 MonoTouch.Design.Client.IPhoneDesignerSession.c__DisplayClass162_0.b__0(ServerProcessConnection c) 在 MonoTouch.Design.Client.IPhoneDesignerSession.c__DisplayClass237_1`1.b__0()

[2016-08-31 00:10:13.6] 信息:重新加载:序列化耗时 0 毫秒

[2016-08-31 00:10:13.9] 警告:发送 Web 请求时失败 #1 (IOException)。正在重试..

[2016-08-31 00:10:13.9] 信息:重新加载:序列化耗时 0ms

[2016-08-31 00:10:14.7] 警告:发送 Web 请求时失败 #2 (IOException)。正在重试..

[2016-08-31 00:10:14.7] 信息:重新加载:序列化耗时 0 毫秒

[2016-08-31 00:10:14.9] 错误:不可恢复的 IOException.. 启动尝试:0,失败重试:3 System.IO.EndOfStreamException:我们无法完全反序列化响应 ---> System.Runtime.Serialization.SerializationException:正在尝试反序列化一个空流。

编辑:我发现的唯一解决方法是断开与 Mac 代理的连接,关闭设计器,然后重新打开会提示您重新连接到 Mac 代理的设计器。这比完全关闭VS要快一点,但并不理想。

【问题讨论】:

  • 你能把你的版本信息发布在 gist (gist.github.com) 中吗? VS:帮助 -> 关于 Microsoft Visual Studio -> 复制信息。 Mac:Xamarin Studio -> 关于 Xamarin Studio -> 显示详细信息 -> 复制信息
  • 解决方法在我身边不起作用。保留 IOException 的错误。 VS 2015 Pro 14.0.25431.01 更新 3 和 MAC:版本 6.1.3 (build 19) Mono 4.6.2 - Xcode 8.2.1 (11766.1)

标签: xamarin xamarin.ios


【解决方案1】:

您的解决方法对我不起作用。我的错误肯定是不同的。

如果您收到此错误,您可以在登录时查看: C:\Users{USER}\AppData\Local\Xamarin\Logs\14.0

在这个文件中,我添加了一个更详细的错误,为什么我的故事板没有打开:

Xamarin.Messaging.Client.MessagingClient 错误:0:[2016-12-27 15:27:39.5593] 执行帖子时接收器发生错误 对于主题 xvs/Designer/4.2.2.6/send-payload 和客户端 vs130 Xamarin.Messaging.Exceptions.MessagingRemoteException:错误 在执行主题回复时发生在客户端 Designer4226 上 xvs/Designer/4.2.2.6/send-payload ---> System.NotSupportedException: 找不到 [ConnectionAttributes: Device=Pad, 的 DeviceConfig, SdkPath=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk, SdkVersion=10.1, ViewAs=Default]

解码此错误更容易。看来我的项目是为 iOS 10.1 构建的,而我的 Xcode 只安装了 iOS 10.2。

我打开 Xcode 并进入模拟器并使用 iOS 10.1 模拟器创建了一个新设备。

关闭故事板并打开它,一切都按预期工作

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-03-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-24
    • 2018-04-02
    • 1970-01-01
    相关资源
    最近更新 更多