I just created a clean machine, did all the installs (3.11.666), and then tried to build a project that was previously building before I had to rebuild the machine. Now I get the below error. The project is a large project that includes Xamarin Forms.
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(828,2): monodroid error XA0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\<Project Location>\ProjectShared.Droid\obj\Debug\__library_projects__\<Library Project>\library_project_imports\__res_name_case_map.txt"
Looks like the actual folder has "__AndroidLibraryProjects__" before the "__library_projects__". There is a "__library_projects__" at the correct level but it's empty.
any chance you can provide us with the full diagnostic build output?  It would help us track down the issue. I assume the <LibraryProject> is just a plain Android Library Project Type which contains Resources such as layout items etc. I will try to replicate this issue here in the mean time.
I encountered the same error. When I drilled down as far as I could go following the path in the error message, I find _AndroidLibraryProjects_.zip
I believe this is unzipped during the build process. The zip file contains the desired files and directories that could not be found.
Trying to unzip, using Windows zip tool, the following message is received
"The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path."
Unzipping with 7Zip, creates a empty file as the error occurs silently, which I believe is the same thing that happens in the Build Process.
My company has brought this issue up with Xamarin and we've been told to map our projects to drive directories. This shortens the directory path and solved the problem.
Ended up in the same situation and I can confirm what @eamr told.
I moved the project to the drive folder and it worked.
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Android. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.