如何使用MSBuild构建Xamarin iOS应用程序?

时间:2014-02-28 18:47:58

标签: msbuild xamarin teamcity

我有一个iOS App项目,在Visual Studio中构建得很好(与我的Mac构建主机配对)。我想使用MSBuild命令构建此项目,以便我可以将Teamcity用于我的构建。 (我的构建代理是Windows机器,它将与Mac构建主机配对)。

目前我运行以下命令:

msbuild MyApp.App.iOS.csproj /t:_RemoteBuild /p:ServerAddress=macmini2.local;Configuration="Debug";Platform="iPhoneSimulator";OutputPath="C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug"

这构建了我的2个库项目,但在构建我的主项目时似乎失败了:

_GenerateBundleContentDir:
  Preparing application bundle
  Copying file from "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyApp.Business.Core.dll" to "C:\Projects\MySolution\MyApp.App.iOS\obj\iPhoneSimulator\Debug\build_package\assemblies\MyApp.Business.Core.dll".
  Copying file from "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyApp.Business.Core.pdb" to "C:\Projects\MySolution\MyApp.App.iOS\obj\iPhoneSimulator\Debug\build_package\assemblies\MyApp.Business.Core.pdb".
  Copying file from "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyApp.Business.Core.dll.mdb" to "C:\Projects\MySolution\MyApp.App.iOS\obj\iPhoneSimulator\Debug\build_package\assemblies\MyApp.Business.Core.dll.mdb".
  Copying file from "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyApp.Business.iOS.dll" to "C:\Projects\MySolution\MyApp.App.iOS\obj\iPhoneSimulator\Debug\build_package\assemblies\MyApp.Business.iOS.dll".
  Copying file from "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyApp.Business.iOS.pdb" to "C:\Projects\MySolution\MyApp.App.iOS\obj\iPhoneSimulator\Debug\build_package\assemblies\MyApp.Business.iOS.pdb".
  Copying file from "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyApp.Business.iOS.dll.mdb" to "C:\Projects\MySolution\MyApp.App.iOS\obj\iPhoneSimulator\Debug\build_package\assemblies\MyApp.Business.iOS.dll.mdb".
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(195,3): error MSB3030: Could not copy the file "C:\Projects\MySolution\MyApp.App.iOS\bin\iPhoneSimulator\Debug\MyAppAppiOS.exe" because it was not found. [C:\Projects\MySolution\MyApp.App.iOS\MyApp.App.iOS.csproj]

1 个答案:

答案 0 :(得分:2)

目前无法使用msbuild构建Xamarin.iOS项目(它正在进行中以及未来(不确定何时)将会发生变化)。

但似乎可以将作品委托给Mac:http://forums.xamarin.com/discussion/comment/44484/#Comment_44484