0
votes

Has anyone managed to build Xamarin Android apps with VS2017 MSBuild and Jenkins?

On our build machine we can build via the command prompt but when building via Jenkins we get this error.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2371,2): error MSB4062: The "Xamarin.Android.Tasks.GetAndroidPackageName" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Build.Tasks.dll. Method 'get_BuildEngine' in type 'Xamarin.Android.Tasks.AsyncTask' from assembly 'Xamarin.Android.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask

We're using a Pipeline script with the following command. The same command works fine with VS2015 MSBuild and Jenkins.

bat "${msbuild15} /consoleloggerparameters:ErrorsOnly /v:quiet /p:Configuration=ProductionRelease /p:Platform=\"Any CPU\" /t:Rebuild Field\Product.Android.sln"

1
can you provide your script?Jesus Angulo
@JRosanowski I am facing the same issue, you got any solution ?Krishna
No, we still haven't managed to resolve this.JRosanowski
@JRosanowski any work around ?Krishna

1 Answers

0
votes
GetAndroidPackageName

This task will be failed majorly because your manifest file gets malframed, may be that manifest xml malframed, unncessary charecters might be present.

Remove them And your issue will be solved..