Xamarin Forms项目设置启动项目 [英] Xamarin Forms project set Startup Project

查看:136
本文介绍了Xamarin Forms项目设置启动项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Android和iOS构建Xamarin Forms应用程序.

I'm building a Xamarin Forms application for Android and iOS.

如何将iOS设置为启动项目?我已经读到您应该右键单击并将其设置为启动项目.但是我找不到选项?

How can i set iOS as startup project? I've read that your suppose to rightclick and set it as startup project. But i can't find the option?

请帮助我.

推荐答案

您需要将配置选项更改为已连接的内容.如果您最初是直接在连接到Mac的iPhone上进行调试,而现在iPhone消失了,则会发生这种情况.当未检测到设备时,Xamarin Studio不会自动切换到iPhone模拟器,而是删除了将该项目用作启动项目的选项.

You need to change your configuration options to something you have connected. This happens if you were originally debugging directly on an iPhone connected to your Mac, and now the iPhone is gone. Xamarin Studio doesn't switch automatically to the iPhone Simulator when a device is not detected, instead removes the option to use that project as a startup project.

要解决此问题,请执行以下操作:

To fix, do this:

  1. 右键单击iOS项目,然后转到选项"
  2. 在构建"->输出"下,从下拉菜单中选择所有配置"
  3. 在平台"下拉菜单中,选择"iPhone模拟器"
  4. 单击确定"保存

现在在Xamarin Studio的左上角,您可以在其中设置Debug或Releas,请确保将其设置为 Debug |. iPhoneSimulator ,而不要 调试| iPhone

Now on the top left corner of Xamarin Studio where you can set Debug or Releas, make sure you set it to Debug | iPhoneSimulator and NOT to Debug | iPhone

...只有这样,您才可以选择设置为启动项目".

... and only then, you'll be able to select "Set As Startup Project".

这篇关于Xamarin Forms项目设置启动项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆