Bug 38401 - [XVS C6SR1] "The "PackLibraryResources" task failed unexpectedly." when an iOS library project contains any bundle resources in the root folder other than images
Summary: [XVS C6SR1] "The "PackLibraryResources" task failed unexpectedly." when an iO...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS (show other bugs)
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- major
Target Milestone: 4.0.1 (C6SR1)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-03 21:01 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-02-26 22:11 UTC (History)
6 users (show)

Tags: BZRC6SR1S1_C6S3
Is this bug a regression?: ---
Last known good build:


Attachments
Test case (16.09 KB, application/zip)
2016-02-03 21:01 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 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.

Related Links:
Status:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2016-02-03 21:01:30 UTC
Created attachment 14873 [details]
Test case

[XVS C6SR1] "The "PackLibraryResources" task failed unexpectedly" when an iOS library project contains any bundle resources other than images




## Regression status: regression in Cycle 6 – Service Release 1

BAD:  XamarinVS 4.0.1.93   (c7ebc0f) + Xamarin.iOS 9.4.1.25 (962a050)
BAD:  XamarinVS 4.0.1.89   (413372c) + Xamarin.iOS 9.4.1.24 (47eb74b4)
GOOD: XamarinVS 4.0.0.1717 (1390b70) + Xamarin.iOS 9.4.0.0  (7322991)




## Steps to replicate

Attempt to build the attached test case in the "Debug|iPhoneSimulator" configuration from Visual Studio while paired with the Mac build host.




## Results

> The "PackLibraryResources" task failed unexpectedly.
> System.ArgumentException: Path cannot be the empty string or all whitespace.
>    at System.IO.Directory.CreateDirectory(String path)
>    at Xamarin.Messaging.VisualStudio.MessagingService.DownloadFile(String appName, String sessionId, String path, String localPath) in C:\Users\builder\data\lanes\2853\c7ebc0f3\source\XamarinVS\src\Messaging\Xamarin.Messaging.VisualStudio\MessagingService.cs:line 475
>    at Xamarin.Messaging.VisualStudio.MessagingService.DownloadFile(String appName, String sessionId, String path) in C:\Users\builder\data\lanes\2853\c7ebc0f3\source\XamarinVS\src\Messaging\Xamarin.Messaging.VisualStudio\MessagingService.cs:line 463
>    at Xamarin.VisualStudio.Build.BuildClient.DownloadItem(String path) in C:\Users\builder\data\lanes\2853\c7ebc0f3\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 114
>    at Xamarin.MacDev.Tasks.PackLibraryResources.Execute() in C:\Users\builder\data\lanes\2853\c7ebc0f3\source\XamarinVS\src\MSBuild\Xamarin.MacDev.Tasks\Tasks\PackLibraryResources.cs:line 31
>    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
>    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-03 23:00:56 UTC
## Possible Workaround

Place the resources in a subfolder within the library project.

For example, if you move "empty.txt" in the attached test case into the "Resources" folder in the iOSClassLibrary1 project (or a folder named "TextFiles", or another name), that stops the problem.


Caution: be sure to backup your project before building with this workaround. See the "side symptom" below for more details.




## Additional "side symptom" when using the workaround

The modification time on the resources somehow gets bumped during the build process when using this workaround. In my tests so far this has not changed the _contents_ of these files change, but to be safe, I would still recommend backing up the project before trying this workaround.
Comment 3 xamarin-release-manager 2016-02-04 13:27:20 UTC
Fixed in version 99.0.0.1218 (master)

Author: jmt
Commit: 50b316d33bd4791149f98ed94473471f48852328 (xamarin/XamarinVS)
Comment 4 Mohit Kheterpal 2016-02-04 15:27:15 UTC
I am able to reproduce this issue with XVS 4.0.1.93 and observe that this issue has been fixed with XVS 4.0.1.91.

Hence closing this issue by marking it as Verified.

Thanks
Comment 5 Udham Singh 2016-02-05 06:06:16 UTC
I have checked this issue with XVS 4.0.1.96 and application is build successfully without any error.

This is screencast for the same : http://www.screencast.com/t/WSqcfqWJ

Environment Info :
Microsoft Visual Studio Enterprise 2015
Version 14.0.24627.00 Update 1 RC
Microsoft .NET Framework
Version 4.6.01040

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90150-00969-AA151
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015 RC   00322-90150-00969-AA151
Microsoft Visual Basic 2015 RC

Visual C# 2015 RC   00322-90150-00969-AA151
Microsoft Visual C# 2015 RC

Visual C++ 2015 RC   00322-90150-00969-AA151
Microsoft Visual C++ 2015 RC

Windows Phone SDK 8.0 - DEU   00322-90150-00969-AA151
Windows Phone SDK 8.0 - DEU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2012.2   4.1.40928.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

CodeInjector   1.0
Injects code into the currently debugging WPF app.

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Xamarin   4.0.1.96 (dcea9c1)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.1.10 (e98e962)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.4.1.24 (47eb74b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-06 04:56:53 UTC
## Status update

The candidate fix for this issue has now been published as a hotfix to the Stable updater channel in XamarinVS 4.0.1.96.
Comment 7 xamarin-release-manager 2016-02-26 22:11:42 UTC
Fixed in version 4.0.1.127 (cycle6)

Author: jmt
Commit: b9ecf6e8938c46d5a646bd68c76efc91adcbb510 (xamarin/XamarinVS)