views:

164

answers:

6

I want to create Contact on Google Apps. I am Using this API

And referring this link

In below code i am using "Using Google.GData.Contacts" :

using Google.GData.Contacts;   // Using Google.GData.Contacts     
using Google.GData.Client;
using Google.GData.Extensions;
using Google.Contacts; // at this place i am getting error

Error: The type or namespace name 'Contacts' does not exist in the namespace 'Google' (are you missing an assembly reference?)

I have included Google.GData.Contacts API. But still it is giving Error.

Can anyone tell me why this is happening? m i missing any Assembly reference?

I want to use:

Contact newContact = new Contact();
newContact.Title.Text = "Liz Doe";

"Contact" does not exist in Either "Google.GData.Contacts" or "Google.GData". Is there any other way to use it?

A: 

Is the answer:

using Google.GData.Contacts;

Ardman
i am using it already.
Preeti Singh
The code you have posted is missing the GData from your using statement.
Ardman
not in the above code you're not
Preet Sangha
You have a duplicate entry. Remove the bottom reference to Google.Contacts.
Ardman
A: 

Like Ardman already noted, this should probably be enough:

using Google.GData.Contacts;

but you also have a line:

using Google.Contacts;

Either the second using is wrong and you need to remove it, or that namespace resides in 1 or more assemblies you have not referenced yet.

Anton
+3  A: 

try

using Google.GData;
RJ1516
even this does not helped. I am anable to use "Contact newContact = new Contact(); " code .
Preeti Singh
A: 

Looking at the website, I'm guessing that there is a seperate reference that you need to add in order to use Google.Contacts. Check your references to see if you have a seperate Google.Contacts library which you can reference.

Ardman
I have downloaded Google API from Above link.And i din't found any reference (library) like "Google.Contacts".m i using wrong Google API.I searched it on Net but din't found any other api.
Preeti Singh
I downloaded the API and added a reference to Google.GData.Contacts.DLL and this then gave me the Google.Contacts namespace in my project.
Ardman
A: 

Read this: http://code.google.com/apis/gdata/articles/dotnet_client_lib.htmt Check if you are following it or not.

Jene
Thanx Ane.But but i followed this link already
Preeti Singh
+1  A: 

You may be using Wrong version. use Version: 1.4.0.2.

You will find it in Program Files Path

Jene
Thanx Ane.It works now.
Preeti Singh