Bug 56828 - The "ResolveLibraryProjectImports" task failed unexpectedly.
Summary: The "ResolveLibraryProjectImports" task failed unexpectedly.
Status: RESOLVED DUPLICATE of bug 30147
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.3 (15.2)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-05-25 07:52 UTC by Miha Markic
Modified: 2017-05-30 09:16 UTC (History)
5 users (show)

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

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

Related Links:
Status:
RESOLVED DUPLICATE of bug 30147

Description Miha Markic 2017-05-25 07:52:33 UTC
When solution directory is deeply nested, I get error below when building an Android project.
This is the same project as https://bugzilla.xamarin.com/show_bug.cgi?id=56827 (same info applies) but slightly different error, most probably related to paths being longer than 260 or 255 or 248 chars.

3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018: The "ResolveLibraryProjectImports" task failed unexpectedly.
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path 'abc_background_cache_hint_selector_material_dark.xml'.
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at System.IO.Directory.Delete(String path, Boolean recursive)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection`1 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1054,2): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Comment 1 dean.ellis 2017-05-30 09:16:14 UTC
This is directly related to #56827 and #30147. The final fix will be the same, so I am marking this as a duplicate of 30147.

The advice from 56827 is to move the project closer to the root of the drive for now. e.g 

c:\Sandbox\<project>

*** This bug has been marked as a duplicate of bug 30147 ***