Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Setting up Jenkins to build a Xamarin Android project. Running MSBuild on the Android csproj file, and would get the following error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(377,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip and extract it to the C:\Windows\system32\config\systemprofile\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\220.127.116.11\content directory. [C:\Repos\Warehouse2\Projects\MobileInventory\MobileInventory.Droid\MobileInventory.Droid.csproj]
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(377,2): error XA5209: Reason: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
If I built the same project from Visual Studio on that server, it would build without any issues.
Building again after successfully building in Visual Studio would yield the following error:
Resources\Resource.Designer.cs(66,127): error CS0117: 'Resource.Attribute' does not contain a definition for 'actionBarSize'
After getting this error, I would manually delete the bin and obj folders in the Android project, and try building with MSBuild again only to retrieve the first error.
I then went to follow the directions to extract the zip file manually into the path specified, but that folder structure did not exist (C:\Windows\system32\config\systemprofile\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\18.104.22.168\content). I can only assume that is why MSBuild was trying to extract that zip file every time, whereas Visual Studio had the same zip file extracted elsewhere.
To get around this issue, I created that folder path (from Xamarin.... to content), and manually extracted the contents of the zip file into that folder. After doing this, every build triggered from Jenkins to MSBuild began working.
it looks like jenkins us running under the system user? I'm not sure how jenkins works but the chances are that the task cannot create the cache in C:\Windows\system32\config\systemprofile\AppData\Local.
Is it possible to change the user under which jenkins is running?
Alternatively you can try to declare the environment variable XAMARIN_CACHEPATH.
And have that point to a directory which can be created without needing special permissions.
Fantastic theory. This is exactly what the problem appears to be. I declared the environment variable, and it is now having no issues extracting the necessary zip files. Thanks so much!
Excellent. Closing as Answered :)