2
votes

ResolveLibraryProjectImports" task failed unexpectedly
System.IO.FileNotFoundException Could not load assembly

I have tried to resolve it like clean bin, obj rebuild again said in the previous results of this issue but it doesn't work for me. Does anyone have a solution for this issue, please help me.

Note: I am having an error in Mono.Android in the References of portable code is this the problem and how to resolve this also?

This is the error I get:

Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'SampleProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'SampleProject.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() SampleProject.Android Build

2
Can you include a full diagnostic build output to your question?Eren Shen

2 Answers

2
votes

=> delete all from C:\Users\username\AppData\Local\Xamarin

=> delete .vs folder

=> restart visual studio in run as admin(if not).

=> clean and rebuild.

2
votes

Mono.Android is purely a native Android dll for Xamarin.Android using this in your portable project will throw an error (Of Course.)

This might be the issue if the error still persists after removing the dll then I would suggest you remove the bin obj folders and clean build and in case it still persists you should upload the output window for the debug build as well as error list explanation for this particular error.