如何使用 mdtool 构建 MonoTouch 项目 [英] How to build MonoTouch Project using mdtool

查看:33
本文介绍了如何使用 mdtool 构建 MonoTouch 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Jenkins 版本上设置 MonoTouch (Xamarin.iOS 2.0) 项目.我有一个为构建设置的用户,我已将所有必需的证书和密钥添加到他们的钥匙串中.

I'm trying to set up a MonoTouch (Xamarin.iOS 2.0) project on a Jenkins build. I have a user that I have set up for the build, and I have added all of the required certificates and keys to their keychain.

当我尝试使用 mdtool(如此处此处)在终端中.具体来说,我运行的命令是 "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool" -v build .当我这样做时,我得到这个输出

When I attempt to use the mdtool (as described here and here) in the Terminal. Specifically Specifically, the command I run is "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool" -v build <path to .sln>. When I do this, I get this output

MonoDevelop Build tool
ERROR [2013-02-28 10:31:36Z]: Android SDK not found, needed by Xamarin.Android add in 
Loading solution: <path to .sln>
   Loading solution: <path to .sln>
      Loading projects ..
Building Solution: <Project name> (Ad-Hoc|iPhone)
   Building: <project name> (Ad-Hoc|iPhone)

此时,构建停止.如果我在我自己的用户而不是 Jenkins 用户下运行相同的命令,这将按预期工作.我已经检查过我确实拥有 jenkins 用户中的所有证书和密钥,并且所有配置文件都可以通过 XCode 访问.我有点不知所措,希望得到一些帮助.

At this point, the build stops. If I run this same command under my own user, and not the Jenkins user, this works as expected. I've checked that I do in fact have all of the certificates and keys in the jenkins user, and that all of the Provisioning Profiles are accessible through XCode. I'm kind of at wits end with this, and would really appreciate some help.

更令人困惑的是,如果我尝试在 jenkins 用户下使用 Xamarin Studio 构建此项目,则该过程会成功而不会出现问题.但是为了自动化构建过程,我必须创建一个可以通过 shell 运行的命令.

To make matters more confusing, if I attempt to build this project using Xamarin Studio under the jenkins user, the process succeeds without issue. But to automate the build process, I have to make a command that can run through the shell.

推荐答案

那是因为产品许可证文件安装在您的用户帐户(它可以工作的地方)但在您的构建服务器帐户(它不起作用)下找不到.

That's because the product license file is installed on your user account (where it works) but cannot be found under your build server account (where it does not work).

您需要从以下位置复制许可证文件:

You'll need to copy the license file from:

/Users/***你的用户名**/Library/MonoTouch/License.v2

到:

/Users/***您的构建服务器帐户**/Library/MonoTouch/License.v2

请注意,某些版本的 Xamarin.iOS(例如 Starter 和 Indie)的许可不允许您执行此操作(因此它可能不起作用).

Note that the license of some editions of Xamarin.iOS (e.g. Starter and Indie) does not allow you to do this (so it might not work).

这篇关于如何使用 mdtool 构建 MonoTouch 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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