0

I am creating Xamarin bindings on a AAR file in Visual Studio. I have created the bindings in Visual Studio using auto-generated code in an Android Bindings Library (Xamarin) project template. The bindings project compiles without errors and the only warnings in the build output relate to this specific issue: "The member '...' does not hide an accessible member. The new keyword is not required."

The problem is when I try to reference the bindings project. I created a blank Xamarin Android app project, called AndroidTest, which and ran fine. I then added a reference to the binding project to Android test. I added no code in AndroidTest that references the binding. When I build the AndroidTest project, I get the following error:

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

The bindings project has no reference to AndroidTest, and there are no other projects in the solution. How do I resolve this error?

Pavel Smirnov
  • 4,611
  • 3
  • 18
  • 28
  • Possible duplicate of this? https://stackoverflow.com/questions/17557097/xamarin-build-error-exception-while-loading-assemblies-system-io-filenotfoundex Add the missing .dll to your project(s). Right click on the References folder -> Add Reference -> Browse -> C:\Windows\Microsoft.NET\Framework64\\ -> Clean your project and rebuild – Saamer Jul 03 '19 at 20:55
  • The missing DLL that the compiler is complaining about here is 'AndroidTest.dll'. The project being build IS AndroidTest and has no reference to itself. This is not an issue of a missing reference. – GET_TO_THE_CHOPPER Jul 03 '19 at 21:16

0 Answers0