2014-02-28 101 views
2

我有一個iOS應用程序項目,在Visual Studio(與我的Mac構建主機配對)中生成良好。我想使用MSBuild命令來構建這個項目,這樣我就可以使用Teamcity來構建我的構建。 (我的構建代理是一臺Windows機器,它將與Mac構建主機配對)。如何使用MSBuild構建Xamarin iOS應用程序?

目前我運行下面的命令:

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] 

回答

2

目前可以使用msbuild來構建Xamarin.iOS項目(它正在被使用和將來(不確定何時)將會改變)。

但是現在看來,這是可能的工作委託給了Mac:http://forums.xamarin.com/discussion/comment/44484/#Comment_44484

+0

感謝您的回答。你是否爲Xamarin工作?如果沒有,你有官方消息來源?順便說一句,這有點令人震驚......我怎樣才能真正使用我的基於Windows的teamcity代理來構建xamarin項目?我在想這個錯嗎? – user2320724

+0

是的,我爲Xamarin工作。我已經使用建議的解決方案更新了該文章。 –

+1

這已經過時了。 Xamarin Studio(可能在不久的將來用於Mac的Visual Studio)會在Mac上安裝msbuild作爲命令行工具。 –

相關問題