How do you export an IPA/APK when using CakeBuild and Xamarin ?

给你一囗甜甜゛ 提交于 2019-12-11 02:03:56

问题


I am trying to use CakeBuild & FastLane to automate the build process for my Xamarin Project. I have a script that is working to execute a "build" command with Cake, but it does not output a IPA/APK file. Here is my current script

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

The directory "bin/release" is always empty


回答1:


I had better luck producing ipa and apk files using Cake.Xamarin.

That said, if you are building for iPhone, have you tired setting the configuration to "Release|iPhone"?




回答2:


Have you tried setting your target to the name of your iOS project within the solution instead?

Keep in mind to replace . in the project name with _ ...

So something like... .WithTarget ("MyProject_iOS")




回答3:


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"));


来源:https://stackoverflow.com/questions/44956828/how-do-you-export-an-ipa-apk-when-using-cakebuild-and-xamarin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!