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

如何使用MSBuild构建Xamarin iOS应用程序?,msbuild,xamarin,teamcity,Msbuild,Xamarin,Teamcity,我有一个iOS应用程序项目,在VisualStudio中构建良好(与我的Mac构建主机配对)。我希望使用MSBuild命令生成此项目,以便可以使用Teamcity进行生成。(我的构建代理是一台Windows计算机,它将与Mac构建主机配对) 目前,我运行以下命令: msbuild MyApp.App.iOS.csproj /t:_RemoteBuild /p:ServerAddress=macmini2.local;Configuration="Debug";Platform="iPhoneSi

我有一个iOS应用程序项目,在VisualStudio中构建良好(与我的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"
这构建了我的两个库项目,但在构建主项目时似乎失败了:

_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]

目前无法使用msbuild构建Xamarin.iOS项目(正在进行中,将来(不确定何时)会更改)


不过,似乎可以将工作委托给Mac:

谢谢您的回答。你为Xamarin工作吗?如果没有,您是否有官方来源?顺便说一句,这有点令人担忧。。。如何实际使用基于Windows的teamcity代理来构建xamarin项目?我想错了吗?是的,我为Xamarin工作。我已经用建议的解决方案更新了帖子。这已经过时了。Xamarin Studio(很可能在不久的将来还将安装Visual Studio for Mac)在Mac上安装msbuild作为命令行工具。