Search code examples
c#.netgoogle-data-api

The type 'EMail' is defined in an assembly that is not referenced


I getting the following error:

Error   1   The type 'Google.GData.Extensions.EMail' is defined in an assembly that is not referenced. You must add a reference to assembly 'Google.GData.Extensions, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0b4c5df2ebf20876'

my code:

using Google.Contacts;
using Google.GData;
using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;

   class Program
    {
        static void Main(string[] args)
        {
            RequestSettings settings = new RequestSettings("test app", "mail", "pass");
            settings.AutoPaging = true;
            ContactsRequest contacts = new ContactsRequest(settings);
            Feed<Contact> list = contacts.GetContacts();

            foreach (Contact contact in list.Entries)
            {
                Console.WriteLine(contact.Emails);
            }

            Console.ReadLine();


        }
    }

how I fix it? Thanks in advance.


Solution

  • fixed

    I reinstall the google data api sdk do I did new project and works fine now.