locked
Build Error - ResolveLibraryProjectImport task failed unexpectedly - access denied RRS feed

  • Question

  • User239681 posted

    Hello everyone,

    Long story short, I believe something is wrong with either (or both) my Visual Studio and Xamarin install.

    Basically, when attempting to build or run ANY project -- even have made new Blank App (android) projects with nothing in them -- I get this error while building.

    1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: The "ResolveLibraryProjectImports" task failed unexpectedly. 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: System.ComponentModel.Win32Exception (0x80004005): Access is denied 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at System.Diagnostics.Process.Start() 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Xamarin.Android.Tasks.MandroidDaemon.CreateDaemon() 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Xamarin.Android.Tasks.MandroidDaemon.GetStandardInputLocked() 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Xamarin.Android.Tasks.MandroidDaemon.SendCommand(Task task, String[] commands, Action1 response) 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Xamarin.Android.Tasks.MandroidDaemon.ExtractResources(Task task, String importsDirectory, Boolean hashAssemblyDirectoryName, String outputDirectory, String outputImportDirectory, IEnumerable1 assemblies, String[]& jars, String[]& resolvedResourceDirectories, String[]& resolvedAssetDirectories, String[]& resolvedEnvironments) 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1062,2): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d_26.MoveNext()

    I have tried this with both 2013 and 2015. And I have also uninstalled/reinstalled VS and Xamarin.

    Any advice would be appreciated. Thanks!

    Tuesday, July 5, 2016 10:29 PM

All replies

  • User239681 posted

    When going to this specific file (called Xamarin.Android.Common.Targets) this is the section of code that appears to be set incorrectly. The pointers do not link properly. Anyone have any idea how to fix this?

    "Target Name="ResolveLibraryProjectImports" Inputs="$(MSBuildProjectFullPath);@(ReferencePath);@(ReferenceDependencyPaths);$(AndroidBuildPropertiesCache)" Outputs="$(_AndroidLibraryProjectImportsCache)"> /Target"

    Tuesday, July 5, 2016 11:14 PM
  • User216094 posted

    Same issue here, were you able to fix?

    Error 2 The "ResolveLibraryProjectImports" task failed unexpectedly. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Xamarin.Android.Tasks.MandroidDaemon.CreateDaemon() at Xamarin.Android.Tasks.MandroidDaemon.GetStandardInput_Locked() at Xamarin.Android.Tasks.MandroidDaemon.SendCommand(Task task, String[] commands, Action`1 response) at Xamarin.Android.Tasks.MandroidDaemon.ExtractResources(Task task, String importsDirectory, Boolean hashAssemblyDirectoryName, String outputDirectory, String outputImportDirectory, IEnumerable`1 assemblies, String[]& jars, String[]& resolvedResourceDirectories, String[]& resolvedAssetDirectories, String[]& resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() App1

    Some statements: - visual studio 2013 - android projects only are affected - xamarin studio on mac could build the same project without any errors - xamarin reinstallation didn't help

    Thursday, July 7, 2016 7:31 PM
  • User240600 posted

    Any update on this?

    Saturday, July 9, 2016 3:51 PM
  • User240600 posted

    I found this to be caused by security software running on my system. So check your anti-virus. I have seen threads on Avast! and in my case, I was running Cylance. Once I reconfigured Cylance, I was able to reinstall Xamarin and the issue went away. Hope this helps others avoid wasting time chasing this!

    Saturday, July 9, 2016 8:05 PM
  • User243911 posted

    Can someone provide more details on how to resolve this?

    Saturday, July 23, 2016 8:52 PM
  • User78729 posted

    It looks like there is something not installing. I've been having this issue for a while on the alpha channel. I've just downgraded Xam.Android to stable and can now compile. If I then change it back to alpha, it returns. Time to get it into BZ me thinks.

    Wednesday, August 3, 2016 11:16 PM
  • User211902 posted

    Same problem here. I was using pre realease too and need change it back to stable version.

    Tuesday, August 16, 2016 5:25 PM
  • User83562 posted

    Same problem here. Have only been using the latest stable version. Several attempts to repair and a complete reinstallation of VS2015 with Xamarin and Android SDK did not change anything. AV deactivation and/or running with Administrator privileges didn't work either. Installed Xamarin Studio... but exact same problem there.

    The system: - Win7 Pro - VS2015 Pro with Update 3 - Xamarin 4.1.1.3 - Gtk# for .NET 2.12.38 - Xamarin Studio 6.0.2 - JDK 1.7.0.550 - Android SDK 1.16

    Appreciate any more hints of how to fix this.

    Wednesday, August 31, 2016 2:44 PM
  • User83562 posted

    After many more failed attempts today I tried to update Xamarin from latest stable to latest beta.... IT WORKS NOW! Currently running Xamarin 4.2.0.628... and not touching it as long as it keeps working... this fragile flower cost me 2 days :-/

    Thursday, September 1, 2016 1:04 PM
  • User2029 posted

    +1, the bug affect the current beta channel. Does anyone from Xamarin really read customer reports ?

    Saturday, September 10, 2016 10:47 AM
  • User76808 posted

    +1 same issue here, just upgrade xamarin studio and open up my project with xamarin studio and close it. Use visual studio to open the project and build to see this error.

    Thursday, September 15, 2016 1:06 PM
  • User134020 posted

    had the same error after updating xamarin to v7. just fixed with clean all - build all - deploy

    Thursday, September 15, 2016 3:30 PM
  • User257894 posted

    same issue here, but i must have caused it by clicking everything trying to learn this stuff. All I did to fix it was reinstall XamarinInstaller.exe - which was quick, as it only does a repair of sorts it seems.

    Saturday, September 17, 2016 4:33 PM
  • User212566 posted

    same here, Xamarin Studio 6.1 on windows, creating Forms app causes this error.

    Monday, September 19, 2016 12:15 PM
  • User65 posted

    https://bugzilla.xamarin.com/show_bug.cgi?id=44460

    Monday, September 19, 2016 11:29 PM
  • User497 posted

    +1 Same Issue Here

    It only happens after some time, but when it occurs once, then it occurs with every attempt to compile. It can be solved by closing and re-starting Visual Studio. Yet, it is very annoying to regularily have to re-start Visual Studio in order to compile :-/

    Tuesday, September 20, 2016 2:39 PM
  • User497 posted

    As a side note: Is it possible to completely disable or even uninstall the Xamarin Android Designer? I don't use it at all and I don't need it.

    Tuesday, September 20, 2016 2:40 PM
  • User2029 posted

    AndreasSelle: rename .axml files to .xml Will compile and run fine. No more custom designer / buggy xml editor, only fast native xml vs editor.

    Tuesday, September 20, 2016 2:44 PM
  • User142812 posted

    Having the same error message as described here. It happens after my designs (.axml) were opened in the Design Viewer. Rebuilding and cleaning solution don't work. Only solution is to restart VS.

    Thursday, September 22, 2016 8:38 AM
  • User239596 posted

    I am experiencing the same issue.

    Friday, September 23, 2016 2:43 PM
  • User45371 posted

    Hi all, the only way I'm able to compile is if I close down all my .axml files and restart Visual Studio. I even tried opening the .axml file as xml with open with... It still opened in Android editor which is definitely the problem. I really liked the suggestions of renaming .axml to xml files (because I never use the Android UI editor anyway, just raw xml). This seems to work great.

    So now I have quicker opening of my layout files and I can compile!

    Be nice if Xamarin fixed this bug soon though. Hope this helps someone.

    Friday, September 23, 2016 3:17 PM
  • User261349 posted

    I am experiencing the same issue. --;

    Friday, October 7, 2016 7:21 AM
  • User260196 posted

    Hello everyone,

    I tried to update Xamarin latest stable(4.2.0.703). It works.

    Sunday, October 16, 2016 10:49 AM
  • User19502 posted

    Workaround: Check your projects to see if there are any broken references. (marked with yellow triangle) Delete all broken references. Recompile.

    For us, the bug is that VS improperly reports broken refs with this misleading error '"ResolveLibraryProjectImports" task failed unexpectedly'.

    Thursday, October 20, 2016 8:18 PM
  • User251406 posted

    any update on this? i have the same issue , updating or downgrade didn't work

    Monday, November 7, 2016 9:52 PM
  • User5953 posted

    close multiple studios

    Saturday, November 12, 2016 9:29 PM
  • User181338 posted

    Restarting VS and other solutions above didn't work for me.

    I had to unload both Android & iOS projects (in this case they're the only ones we're working on) and try and build. The error was coming from my Droid project so then I could see all the actual issues from my PCL (had just done a load of refactoring so lots of issues), once I had solved these I reloaded the Droid project and it built/deployed fine.

    Hope this helps!

    Tuesday, November 29, 2016 4:15 PM
  • User120789 posted

    Valuable tip @NinjaFocks ! Thanks.

    Friday, December 2, 2016 6:59 PM
  • User288902 posted

    Worked for me to turn off Avast and rebuild the solution.

    Thursday, January 5, 2017 8:48 AM
  • User277909 posted

    In my case, I was getting error The "ResolveLibraryProjectImports" task failed unexpectedly. when I open a project downloaded from Xamarin.University on Windows 10 and the path for one of the files ends up being to long (longer than 260 characters). So, to solve my problem, I would copy the directory as shallow as possible, so instead working directly in the structure of downloaded project, I would copy deepest directory containing the project into my C:. Building would work then without an issue as the path to all files in the project got shortened.

    Monday, January 16, 2017 6:35 PM
  • User286075 posted

    Ok, it's a little bit strange...In my case a cause of error seemed an corrupted .xaml file. Clean project, then exit of VS works, but after clean all and rebuild the whole application, one .xaml file seemed to continue with error. then i copied the code into another editor, deleted it and recreate it again, then i pasted the code back. seems to work with me.

    Thursday, January 19, 2017 3:10 PM
  • User88553 posted

    @dinobuljubasic said: In my case, I was getting error The "ResolveLibraryProjectImports" task failed unexpectedly. when I open a project downloaded from Xamarin.University on Windows 10 and the path for one of the files ends up being to long (longer than 260 characters). So, to solve my problem, I would copy the directory as shallow as possible, so instead working directly in the structure of downloaded project, I would copy deepest directory containing the project into my C:. Building would work then without an issue as the path to all files in the project got shortened.

    I have the same problem with a project I downloaded from Github. Just like you @dinobuljubasic, I moved the deepest project up the folders and reload it into VS. It built without any more errors. :)

    VS should have detected the problem and provided a clearer error.

    Monday, January 23, 2017 4:33 PM
  • User127089 posted

    @Halukmy said: close multiple studios

    Thanks Halukmy - this worked for me. I had a sample project open next to my main XF project and sample refused to build. As soon as I closed my main XF project the sample built OK.

    SteveG

    Wednesday, January 25, 2017 9:47 AM
  • User194178 posted

    For my case it was long TFS path, after shortening it all is fine.

    Thursday, February 2, 2017 12:39 PM
  • User239535 posted

    My problem with this message was related to resulting path depth over 260. Moved the project to c:\ and compiled OK !

    Friday, February 10, 2017 11:37 AM
  • User294638 posted

    remove bin/obj directories , worked for me

    Monday, March 13, 2017 1:58 PM
  • User309346 posted

    ResolveLibraryProjectImport task failed unexpectedly

    Thursday, March 16, 2017 4:04 PM
  • User309346 posted

    plz help

    Thursday, March 16, 2017 4:05 PM
  • User246263 posted

    I am having the same issue "The "ResolveLibraryProjectImports" task failed unexpectedly." in Xamarin. Android. Deleting bin ,obj file did resolve the issue. Also tried restarting the VS and PC too.

    Please help. :|

    Wednesday, March 22, 2017 12:03 PM
  • User305828 posted

    I had the same problem, I updated Xamarin.forms and android SDK and It resolved part of the problem. It seemed that there was a problem with Hyper-V and VS Android Emulator (Because both of them use the same hd resourses) , so I turned it ( Hyper-V ) off, and the problem was resolved.

    Sunday, March 26, 2017 7:15 PM
  • User313471 posted

    I'm having same issue here... any help will be appreciated

    Friday, March 31, 2017 3:29 AM
  • User253201 posted

    Help needed, Error The "ResolveLibraryProjectImports" task failed unexpectedly.

    Friday, April 7, 2017 8:09 AM
  • User314294 posted

    Same here.

    The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'My.Xam, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'My.Xam.dll' at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.GetAssembly(String fileName) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

    Saturday, April 8, 2017 6:51 PM
  • User246263 posted

    When I get this I had cleaned the project . Deleted the bin,obj files and rebuild the solution. Also changed the long path of the project. Worked for me.

    Wednesday, April 12, 2017 5:38 AM
  • User316549 posted

    I had the same problem earlier with sample project. I updated the xamarin.forms for every project to the stable version instead of uninstalling the older one and installing back. Clean the solution and rebuild, the problem resolved without any error.

    Thursday, April 13, 2017 7:42 AM
  • User234656 posted

    I had this same error with project working fine on other computer. Turned out file+pathnames became too long (> 260 characters).

    Moved working directory closer to root, that fixed everything.

    Saturday, April 15, 2017 2:30 PM
  • User252595 posted

    Go to the project file and delete everything inside bin and obj folder. Works for me.

    Sunday, April 30, 2017 8:53 AM
  • User317643 posted

    Run visual studio as administrator worked for me... Press windows button from keyboard and type visual studio .. Then right click on visual studio and select "Run as administrator"..

    Wednesday, May 3, 2017 9:31 AM
  • User235668 posted

    I was able to see the missing components after uninstalling Xamarin.Forms and re-installing.

    Friday, May 5, 2017 5:49 PM
  • User317950 posted

    Still having this error pop up on my projects. Have tried all the usual solutions that have been posted on here with no success.

    Tuesday, May 9, 2017 11:05 AM
  • User304338 posted

    I had the same error, by mistake i typed SS in Margin="0,10,10SS,0" property. After removing SS, project executed successfully. You may have some mistakes in your projects like i did.

    Friday, May 12, 2017 11:28 AM
  • User326813 posted

    I had same problem! What worked for me I just checkout my project to different and shorter folder path(C:/VSProjects/) as @Prajakta.Shinde mentioned in her post.

    @Prajakta.Shinde said:

    When I get this I had cleaned the project . Deleted the bin,obj files and rebuild the solution. Also changed the long path of the project.

    I have current setup: Visual studio 2015 Xamarin v4.5.0.476

    Friday, June 2, 2017 5:52 AM
  • User176361 posted
    • Close the project.
    • Delete the folders bin and obj from solution.
    • Reopen the project.
    • Clean and Rebuild the project.

    I hope I have helped.

    Wednesday, June 21, 2017 8:03 PM
  • User292169 posted

    I know this doesn't apply to everyone who has posted, but it is what brought me to the thread in the first place.

        <ListView.GroupHeaderTemplate>
            <DataTemplate>
                <TextCell Text="{Binding Name}"
                    Detail="{Binding Keyword}"
                    TextColor="#f35e20"
                    DetailColor="#503026" />
                <Button Text="Edit"/>
            </DataTemplate>
        </ListView.GroupHeaderTemplate>
    </ListView>
    
    Friday, June 23, 2017 7:09 AM
  • User11701 posted

    I was creating a brand new Xamarin.Forms app using Visual Studio 2017 and hit this error.

    I had updated all my nuget packages and was rebuilding when it happened - this is a skeleton application at this point so I had no idea what was happening. Was is an incompatible Nuget package or did one of them not install correctly?

    No, not a Nuget problem at all as it happens.

    The problem was that I had let Visual Studio save it to its default location and somewhere along the lines there is a files whose complete path is too long!

    Yep - I kid you not. In this day and age 'Path Too Long' is still a problem on Windows!

    Moved to root of my D drive and all is well now!

    Tuesday, June 27, 2017 12:25 PM
  • User277209 posted

    Got this same issue but not at all able to del the bin/obj, specifically ...Droid\obj\Release_libraryprojects_\MPAndroidChart**libraryproject_imports**

    Monday, July 3, 2017 3:19 PM
  • User169571 posted

    In my case i accidentally referenced a Windows only library in the pcl. The error message showed it but took me some time to notice. After removing it the project was building again.

    Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'Windows.Foundation.UniversalApiContract.winmd, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Windows.Foundation.UniversalApiContract.winmd.dll' at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.GetAssembly(String fileName) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

    Thursday, July 6, 2017 3:42 PM
  • User217567 posted

    I had the same problem. Check your path where you started your application. Mine was in C:\Users\Gary\Documents\Visual Studio 2017\ and the path was too long. Stinking Windows. I put it into C:\Source and the problem went away.

    Monday, July 10, 2017 1:15 PM
  • User253623 posted

    I tried many solutions with deleting bin & obj folder, clean, rebuild, changing build configurations etc.but the only reliable workaround for me is to close and reopen Visual Studio for WIndow,but Still the Problem no Solve..

    Friday, August 11, 2017 11:59 AM
  • User24062 posted

    Yup, here we are in the 21st century still stuck with a DOS criteria from the 1980s. Hit this again today after installing a Nuget package and browsing through the package it didn't seem add anything that should have thrown the error so possibly a VS bug.

    Tuesday, August 22, 2017 10:29 PM
  • User212025 posted

    I encountered this error today and it appears to be related to the path for the project being too long. Moving it to a more shallow path should solve this exception.

    Friday, August 25, 2017 4:01 AM
  • User28549 posted

    Another way this will manifest itself is if you put a collection of views inside a container that does not accept children.

    xml <!-- this will break --> <ContentView> <ContentView.Content> <!-- this needs to be wrapped in a view that accepts children like <Grid />, <StackLayout />, etc --> <Label Text="Foo" /> <Button Text="Foo" /> </ContentView.Content> <ContentView>

    Saturday, August 26, 2017 4:14 PM
  • User353052 posted

    I had the same problem and after inspecting the error message it was saying that the path to some source files were too long. After changing some directory names to short the overall path, everything worked

    Wednesday, October 11, 2017 10:35 AM
  • User14370 posted

    @Halukmy said: close multiple studios

    Thanks that solved my problem

    Wednesday, October 11, 2017 1:24 PM
  • User250011 posted

    Had same problem. Here is my solution

    1. Restart Visual Studion
    2. Open the Project
    3. Clean the solution
    4. Rebuild the solution
    5. Close solution
    6. Reopen the project
    Sunday, November 5, 2017 8:18 AM
  • User354499 posted

    Par for the course with frameworks like this in VS. Build and build often is the lesson here! This is almost a trickle-down problem and can be very difficult to find the REAL reason. Here was mine...

    See the real issue above was: "Specified argument was out of the range of valid values." Very difficult to see / figure out where that error is coming from as well. It was bad binding attempt to "Desc" property. Normally an invalid binding just silently fails and I still have no idea why this one caused a bad build. Had to rollback to figure it out.

    If I tried cleaning / rebuilding, the subsiquent ResolveLibraryProjectImport task failed error would occur and obfuscate the real issue.

    Monday, November 6, 2017 9:16 PM
  • User358596 posted

    I had the same issue, i moved the code to an upper directory which resolved the issue for me

    Thursday, November 23, 2017 3:59 PM
  • User128730 posted

    I have the same issue here , using Visual Studio 2017 for xamarin forms. Does anyone found solution ?

    Friday, November 24, 2017 7:45 AM
  • User332304 posted

    Downloaded the appropriate Nuget packages. Cleaned the project. Unloaded the project. Reloaded the project. Restarted Visual studio. Again Unloaded the project. Reloaded the project. Then it worked.

    Not sure whether this will work for everyone. But always try to do these things before jumping on to more complicated solutions. This is pretty much XAMARIN 101.

    Friday, November 24, 2017 5:53 PM
  • User354662 posted

    Just Change the location of your project to shortest path, that's it error will disappear

    Wednesday, December 6, 2017 7:42 AM
  • User360954 posted

    I am getting following error.

    Severity Code Description Project File Line Suppression State Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'KtMobileApp, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'KtMobileApp.dll' at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() KtMobileApp.Android

    Friday, December 8, 2017 9:23 AM
  • User324119 posted

    I do not understand why all the time there are some strange problems. Constantly, some connections are lost or some problems with import! It is impossible to work because of unstable work of xamarin :s :s :s :s :s :s :s :s :s :s :s

    The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'AQTMobile, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'AQTMobile.dll' at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

    Tuesday, December 12, 2017 9:24 AM
  • User368218 posted

    I'm getting this error as well (ResolveLibraryProjectImports) and I think this error is just hiding other errors. I went through my build log (set to Detailed in VS options) and I found some other errors occurring and when I resolved THOSE errors, this error went away. So, I think this error might be the result of some buggy tooling not exposing the underlying errors. I'm just guessing, though.

    Wednesday, May 16, 2018 2:36 PM
  • User21269 posted

    I was able to figure this out: See link "bugzilla.xamarin.com/show_bug.cgi?id=41968#c2"

    Basically, I wanted to use "ApplicationData.Current.LocalFolder.Path" from my .NET Standard library project(to use from my UWP project, using "Device.RuntimePlatform" enum) so it added a reference to "Windows.Foundation.UniversalApiContract.winmd.dll". I changed the folder to "Environment.SpecialFolder.LocalApplicationData" for my UWP project and I removed the ref to "Windows.Foundation.UniversalApiContract.winmd.dll". Voilà!. Problem Solved!

    I HTH G.P.

    Friday, August 10, 2018 12:47 PM
  • User236424 posted

    @dinob said: In my case, I was getting error The "ResolveLibraryProjectImports" task failed unexpectedly. when I open a project downloaded from Xamarin.University on Windows 10 and the path for one of the files ends up being to long (longer than 260 characters). So, to solve my problem, I would copy the directory as shallow as possible, so instead working directly in the structure of downloaded project, I would copy deepest directory containing the project into my C:. Building would work then without an issue as the path to all files in the project got shortened.

    This worked for me!

    Sunday, August 12, 2018 7:05 PM
  • User373674 posted

    I manually deleted bin/obj folders, cleaned, rebuilt, restarted etc. but it didn't help. File path lengths were not an issue either. I ended up re-installing Xamarin.Forms and that seems to have fixed this problem...for some reason.

    Monday, October 29, 2018 8:30 PM
  • User115860 posted

    In my case, there was no way to fix it by cleaning, rebuilding, deleting bin and obj folders or restarting VS. The error message was very weird. Together with the error of this topic I had a "Value cannot be null. Parameter name: method". Which was pointing to line 1 of a XAML file. Totally no sense. Then I started to remove part of the XAML code in that file, and I found it was building. With this "monkey approach", I've been removing XAML code, building and see if it worked or not. Finally I found there was an error on a Label item. The FontSize attribute was not correct. Fixed it, and it finally worked. But this is frustrating. Lost hours to find it. The build process from the nineties, purely from command line, was more precise in giving you the error position.

    Thursday, February 14, 2019 8:52 AM