【问题标题】:Can I build Xamarin iOS from the csproj only an not use the solution command line我可以仅从 csproj 构建 Xamarin iOS 而不使用解决方案命令行吗
【发布时间】:2014-05-25 12:08:15
【问题描述】:

我想在我的解决方案中构建一些应用程序,我想单独构建它们

运行: /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build "--configuration:Release|iPhone" ./42.csproj

失败。

我确实看到所有 Xamarin 示例都使用带有 mdtool 的解决方案文件 (.sln),但我仍然想知道有一种方法可以仅在我的解决方案中引用项目。

【问题讨论】:

    标签: ios xamarin.ios solution csproj mdtool


    【解决方案1】:

    你可以这样运行它:

    /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build -c:"Release|iPhone" -p:"42"
    

    运行此程序时,您需要确保您位于解决方案文件夹中。上面命令中的 42 应该引用你的 iOS 项目文件所在的子文件夹,而不是项目文件本身。

    【讨论】:

    • 似乎在我写这个问题的时候这是不可能的,但是 xamarin 后来添加了这个功能。谢谢理查德
    【解决方案2】:

    好吧,在与 xamarin 交谈后,他们声称不推荐使用 mdtool。有人告诉我使用 xbuild,方法是:

    xbuild Project.sln /p:Configuration=AppStore /p:Platform=iPhone /p:BuildIpa=true /t:42
    

    这会将 BuildIpa 标志设置为 true。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-30
      • 2012-01-03
      • 2011-04-22
      • 2014-05-06
      • 2016-01-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多