I have an iOS App project, builds fine in Visual Studio (paired with my Mac build host). I want to build this project using an MSBuild command, so that I can use Teamcity for my builds. (My build agent is a Windows machine which will pair with a Mac build host).

Currently I run the following command:

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"

And this builds my 2 library projects, but it seems to fail when building my main project:

_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]
有帮助吗?

解决方案

At the moment it is not possible to build Xamarin.iOS projects using msbuild (it is being worked on and in the future (not sure when) this will change).

However it seems it's possible to delegate the work to the Mac: http://forums.xamarin.com/discussion/comment/44484/#Comment_44484

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top