2

我正在尝试使用 CakeBuild 和 FastLane 来自动化我的 Xamarin 项目的构建过程。我有一个脚本正在使用 Cake 执行“构建”命令,但它不输出 IPA/APK 文件。这是我当前的脚本

    MSBuild("./MyDirectory/MyProject.sln", settings =>
  settings.SetConfiguration("Release")
      .WithTarget("Build")
      .WithProperty("Platform", "iPhone")
      .WithProperty("BuildIpa", "true")
      .WithProperty("OutputPath", "bin/Release/")
      .WithProperty("TreatWarningsAsErrors", "false"));

目录“bin/release”始终为空

4

3 回答 3

2

我最好使用Cake.Xamarin生成 ipa 和 apk 文件。

也就是说,如果您正在为 iPhone 构建,您是否厌倦了将配置设置为“Release|iPhone”?

于 2017-07-18T13:40:58.990 回答
1

I assume you are running this on a windows machine. Then you maybe have to specify your Xamarin Build Agent. But I'm not sure about this. Try to add the properties ServerAddress, ServerUser and ServerPassword like this:

MSBuild("./MyDirectory/MyProject.sln", settings =>
  settings.SetConfiguration("Release")
      .WithTarget("Build")
      .WithProperty("Platform", "iPhone")
      .WithProperty("BuildIpa", "true")
      .WithProperty("ServerAddress", "NAME_OF_YOUR_MAC")
      .WithProperty("ServerUser", "NAME_OF_YOUR_MAC_USER")
      .WithProperty("ServerPassword", "PASSWORD_OF_YOUR_MAC_USER")
      .WithProperty("OutputPath", "bin/Release/")
      .WithProperty("TreatWarningsAsErrors", "false"));
于 2017-07-19T08:32:21.547 回答
1

您是否尝试将目标设置为解决方案中的 iOS 项目的名称?

请记住将.项目名称中的替换为_...

所以像... .WithTarget ("MyProject_iOS")

于 2017-07-17T21:02:10.753 回答