12

I am trying with Xamarin and I try to deploy the iOs project to see it into iOS Emulator and I could not do it because I have the following error

metadata file .dll' could not be found......

I have try to fix it clean the solution and rebuild the project and solution and others found in Stackoverflow website but I could not fix it, for it, Could anybody help me with that? Thanks in advance Alejandro Castan Ps. Sorry for my little English

Alejandro Castán
  • 289
  • 2
  • 4
  • 11

7 Answers7

12

These kind of errors occur many times in Visual Studio 201X projects. What I did to fix it, was:

  1. Right click on the Solution --> at the left panel click on Configuration Properties --> Configuration and try to uncheck the projects where the .dll errors are referring to, apply, and then recheck & apply again.
  2. If this doesn't fix the problem for you, try to solve the other code errors first, and then rebuild the solution. The Metadata file '.dll' could not be found errors didn't occur anymore after solving the other code errors.
A. Gh
  • 631
  • 9
  • 24
1

I take no credit for this, but it worked for me:

http://www.cazzulino.com/project-dependency-does-not-build-with-xamarin.html

Iain STIRZAKER
  • 221
  • 3
  • 8
1

You might have two XAML file with same x:Class name, probably when you copy a XAML file forgot to rename the x:Class name

TMSAL
  • 103
  • 8
0

For me dealing with a legacy app with multiple dll parts, I need to:

  • Drop the not found assembly references and add them back as project references.
  • And also make sure to compile the iOS version with "platform x64" or "platform x86" configuration, instead of "AnyCPU".

Then the compilation works well via a remote Mac connection.

As a clarification, the question doesn't mention how the iOS version is compiled when the problem happens. In my situation, the legacy code compiles well if I compile it on a local Mac device, the same problem only happens when I try to figure out the remote Mac compilation on my Windows Visual Studio.

wangkaibule
  • 808
  • 1
  • 9
  • 20
0

You may have tried to build the whole solution.

For me it was because the Xamarin Form project has an error therefore it cannot build the xxx.dll. So when I build the whole solution, the Android project will try to use the xxx.dll, which is the metadata file, but as the Xamarin.Form project is not built successfully, this dll is not there.

So you should build the Xamarin.Form project first and make sure this one builds. It will give you more specific error locations when you build this one.

Zweisteine
  • 31
  • 3
0

In my case this was due to having conditional compilation symbols in my code (__IOS__;__ANDROID__), so, you have to define them in the Debug or Release Build Options located at the Build/General options tab of the Project.

benjamingranados
  • 438
  • 5
  • 15
0

If anybody facing this issue in VS 2022, if you enable MSBuild on Mono it might help in resolving. Please see below the screenshot were it asks for the same.

MSBuild on Mono

Anand
  • 744
  • 1
  • 8
  • 14