Home » c# » System.ObjectModel Warning Xamarin does not run on Android

System.ObjectModel Warning Xamarin does not run on Android

Posted by: admin February 22, 2018 Leave a comment

Questions:

We are running the ‘Welcome to Xamarin` example on Visual Studio Enterprise, using the latest Xamarin, in a Windows 8.1 environment.

We are managing to build and run on both Windows and Apple, but we are facing problems with Android.

Error:
The referenced component System.ObjectModel could not be found.

The errors can be seen in the screen shot below:

See screenshot

We’ve already tried searching online for solutions, we found some, which we tried, but to no avail.

On the other hand, is Xamarin compatible with Windows 8.1? Perhaps some Android requirement actually needs a Windows 10 environment.

Any help would be appreciated.

Answers:

Right click on your Android project’s references and manually add the reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.ObjectModel.dll. And technically that’s a warning, not an error.

Questions:
Answers:

I simply removed the reference entirely since none of my code actually used it.

Questions:
Answers:

In the Package manager console type: (Select the Android project)

update-package -reinstall

Is slower but is the correct method and always works

Questions:
Answers:

Try moving it to desktop, then add it as ref in solution. worked for me, visual studio had access to all the other ref but for some reason dident have access to that specific ref. So i moved it, and i think it gave visual studio access. simply try to move it where access wont be a problem.

Questions:
Answers:

Copy dll and paste to packages folder. Change reference to new location and run project. Of course it’s temporary solution. You can check another location for path without white spaces in folders name.
ovee