Getting CreateManagedLibraryResourceArchive task failed unexpectedly error when building

I have a project that I've built hundreds of times and after a windows update and rebooting yesterday its started giving me the error below. I've tried deleting the file its complaining about but it will just complain about another library with the same problem. If I delete all of the obj files for the entire solution it will still fail at one of the libraries. I have tried uninstalling and reinstalling xamarin and I'm not sure what else to try. My coworkers can build the solution just fine.

Severity Code Description Project File Line Suppression State
Error The "CreateManagedLibraryResourceArchive" task failed unexpectedly.
System.IO.IOException: The file 'D:\Source\NewTrunk\Core\SmartPhone\Android\meGeoFrameworks\obj\' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Xamarin.Android.Tasks.CreateManagedLibraryResourceArchive.c__AnonStorey0.<>m__0(String f)
at Xamarin.Android.Tools.Files.ArchiveZip(String target, Action`1 archiver)
at Xamarin.Android.Tasks.CreateManagedLibraryResourceArchive.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() meGeoFrameworks



  • SeanIrvingSeanIrving USMember

    I was able to fix the problem by deleting all the source code and rechecking it out. While deleting the files I found that ADB had an open file handle to the directory in which the error was pointing to, so after killing adb and deleting the last file then redownloading all the source I was able to build.

  • Redownloading was not necessary in my case. I just removed the file i.e.

    rm D:\Source\NewTrunk\Core\SmartPhone\Android\meGeoFrameworks\obj\

Sign In or Register to comment.