Forum Visual Studio

The type or namespace name 'Assembly' could not be found

ChunYuChunYu CAMember, University

I took the form class last Friday. The instructor showed us some cool scripts. I am trying to following his scripts, but I got the error :
"The type or namespace name 'Assembly' could not be found"

Assembly core = typeof(Label).GetTypeInfo().Assembly;
TypeInfo viewType = typeof(View).GetTypeInfo();

        foreach (var controlType in core.DefinedTypes.Where(viewType.IsAssignableFrom))
            var label = new Label
                Text = controlType.Name,
                HorizontalOptions = LayoutOptions.CenterAndExpand


VS 2013 can't find Assembly, GetTypeInfo. In the Android Components, I have included Xamarin Mobile (0.74), and Android Support Library v13(

In the app.cs, I have the following references.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;

Why it worked in the class, but no my laptop?



Sign In or Register to comment.