[mono-android] Build script on mac
jonp at xamarin.com
Sun Feb 19 15:48:43 UTC 2012
On Feb 19, 2012, at 2:07 AM, Steven Pack wrote:
> Where are all the targets defined?
They're included within the .csproj, which means that I should have mentioned that you need to run xbuild on the .csproj. :-)
xbuild YourSolution.sln /t:Install
This _may_ fail:
It will fail if the directory contains both .sln and .csproj files, as the .sln gets priority.
You need to explicitly provide the project file:
xbuild YourProject.csproj /t:Install
MSBuild on Windows is the same way: there are SignAndroidPackage and the other targets, but they'll only be found if you build the .csproj, not the .sln.
> And how do import them?
They're imported automatically in the .csproj:
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
> It looks like xbuild does try to import Mono.MonoMac.targets which I assume is where they are located...?
I would guess that your solution has both Mono for Android projects and MonoMac projects, and somehow you're executing the MonoMac project.
> Also, how do I specifiy Clean and RebuildAll? Are they just targets?
Yes, they're just targets. I don't know about RebuildAll, but Clean is also specified on the .sln:
xbuild /t:Clean YourSolution.sln
More information about the Monodroid