Jenkins script failing to package Android when using a Custom Configuration name

kodejackkodejack Gordon LangfordGBUniversity ✭✭
edited August 2014 in Xamarin.Android

Hi

I have been running a successful CI script for while now. However I have hit an issue with xbuild and packaging the APK for android.

Our nightly release works perfectly as it uses the standard Release configuration as the $RELEASETYPE shown below

xbuild "$rootCom.Droid.csproj" /p:Configuration="$RELEASETYPE" /t:PackageForAndroid;

The issues is that we have a number of other release targets/configurations for example Release_QA, this causes the packaging call to fail with numerous errors.

One of which looks like this

/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Release_QA Platform: AnyCPU.

Is this a limitation of xbuild or I'm missing something else?

Posts

  • kodejackkodejack Gordon Langford GBUniversity ✭✭

    OK I fixed the issue by adding some additional parameters that address what the error is telling us:

    /Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets:
    error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform
    combination. Original values: Configuration: Release_QA Platform: AnyCPU.

    xbuild "$rootCom.Droid.csproj" /p:Configuration="$RELEASETYPE" /p:Platform="AnyCPU" /p:OutputPath="bin/Release" /t:PackageForAndroid;
    

    The AnyCPU parameter sometimes has a space between the words which can cause issues. However specifying the Outputpath is what eventually fixed the issue

  • TomOpgenorthTomOpgenorth Tom Opgenorth CAXamarin Team Xamurai

    It's odd that you need to specify the OutputPath - I've never had to do that in either Jenkins or TeamCity. Looking at your command line I wonder if it's because you don't identify the build target with /t (i.e. /t:SignAndRelease)?

Sign In or Register to comment.