Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8866429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:46:55+00:00 2026-06-14T16:46:55+00:00

I have got my PCL model to build now, which took a bit of

  • 0

I have got my PCL model to build now, which took a bit of time making plug-ins, however now in my Android UI project I get two errors when building it.

First error is:

The type 'System.Collections.ObjectModel.ObservableCollection`1<T0>' is defined in an assembly that is not referenced.
You must add a reference to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e,
Retargetable=Yes'.  C:\ENM\Main\src\prod\Mobile\Stakeholder\UI.Android.vNext\Views\LocationsMapView.cs  40  32  UI.Android.vNext

The second error is:

foreach statement cannot operate on variables of type 
'System.Collections.ObjectModel.ObservableCollection`1<BK.EMS.Stakeholder.Model.ViewModels.LocationViewModel>' 
because 'System.Collections.ObjectModel.ObservableCollection`1<BK.EMS.Stakeholder.Model.ViewModels.LocationViewModel>' 
does not contain a public definition for 'GetEnumerator'
C:\ENM\Main\src\prod\Mobile\Stakeholder\UI.Android.vNext\Views\LocationsMapView.cs  40  32  UI.Android.vNext

I have referenced the System.Windows assembly from the System.Windows.Droid project, which is supposed to forward ObservableCollection<>.

The lines where the error occurs:

private void AddLocationOverlays()
{
    if (_itemizedOverlay.Size() > 0) _itemizedOverlay.ClearOverlayItems();
    RunOnUiThread(() =>
    {
        foreach (var location in ViewModel.Locations)
        {
            _itemizedOverlay.AddOverlayItem(location);
        }
        _mapView.Invalidate();
    });
}

The Locations property in my ViewModel looks like this:

public ObservableCollection<LocationViewModel> Locations
{
    get { return _locations; } 
    set
    {
        _locations = value;
        RaisePropertyChanged(() => Locations);
    }
}

Nothing too complicated and works fine in the non-PCL models…

So how do I get around and fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:46:56+00:00Added an answer on June 14, 2026 at 4:46 pm

    We now have a solution to this problem – see fix from Daniel Plaisted in Portable Class Library strong assembly reference problems in MonoTouch/MonoDroid

    This fix is checked in at https://github.com/slodge/MvvmCross/commit/f6a88048467838e5ac5ca687744dc0b2d1958aa8

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a form which is generated by model object. <%= form_for(@pages) do
I have got a form into which information is entered, and a drop down
I have got a table [newsletter] in the db, which saves the email address,
I have got a suggestion to restrict an Android application to be installed a
I have got a few tables which I am trying to join. I just
I have got idea of how to build a website in 2 languages, i
I have got my HTML5 project a bit further along - I have one
I have got date field in my foos table. So now I need to
I have got a bit of a problem. I have two pages (Thumbnail.aspx &
We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.