Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Error CS0012: The type 'System.ComponentModel.INotifyPropertyChanged' is defined but not found

$
0
0

My first attempt to use Xamarin.Forms and I've his several issues, most of which I've worked around but the latest I cannot find a solutions for, When compiling the sampe code on http://developer.xamarin.com/guides/cross-platform/xamarin-forms/introduction-to-xamarin-forms/ . I ghet a compile erro. At first I thought it was my code and so used the sample code below and still get an erro:

E:\Development\xamarin\formtest01\formtest01\content_main.cs(15,15): Error CS0012: The type 'System.ComponentModel.INotifyPropertyChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (CS0012) (formtest01)

using System;
using Xamarin.Forms;

/*
* Defines the main page ineterction for the test app
*
*/

namespace formtest01
{
public class StackLayoutExample: ContentPage
{
public StackLayoutExample()
{
Padding = new Thickness(20);
var red = new Label
{
Text = "Stop",
BackgroundColor = Color.Red,
Font = Font.SystemFontOfSize (20)
};
var yellow = new Label
{
Text = "Slow down",
BackgroundColor = Color.Yellow,
Font = Font.SystemFontOfSize (20)
};
var green = new Label
{
Text = "Go",
BackgroundColor = Color.Green,
Font = Font.SystemFontOfSize (20)
};

        Content = new StackLayout
        {
            Spacing = 10,
            Children = { red, yellow, green }
        };
    }
}

}

Any ideas? I've re-installed visual studio express in an attempt to refresh the .net assemblies but to no avail.


Viewing all articles
Browse latest Browse all 58056

Trending Articles