Can I build Xamarin iOS from the csproj only an not use the solution command line

杀马特。学长 韩版系。学妹 提交于 2020-01-13 19:31:40

问题


I have a few apps i want to build inside my solution and I want to build them separately

running : /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build "--configuration:Release|iPhone" ./42.csproj

fails.

I do see that all of Xamarin examples use a solution file (.sln) with the mdtool, but I am still wondering of there is a way to reference just on project inside my solution.


回答1:


Well After talking with xamarin they claim that using mdtool is not recommended. I was told to use xbuild and the way to do it is:

xbuild Project.sln /p:Configuration=AppStore /p:Platform=iPhone /p:BuildIpa=true /t:42

This will set the BuildIpa flag to true.




回答2:


You can run it like this:

/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build -c:"Release|iPhone" -p:"42"

You need to make sure you are in your solution folder when you run this. The 42 in the above command should reference the sub folder that your iOS project file is in, not the project file itself.



来源:https://stackoverflow.com/questions/23855103/can-i-build-xamarin-ios-from-the-csproj-only-an-not-use-the-solution-command-lin

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