Matt
Matt

Reputation:

Importing namespaces isn't working for an API I just installed

I just got the Google Data API and I can't seem to use it in my application. I got the msi file, built the Google Data API SDK successfully.

Then I went back to my project, right clicked on the Bin folder and selected Add Reference... From there I added all of the dlls in the C:\Program Files\Google\Google Data API SDK\Redist folder.

Now in my projects when I type:

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

Google gets underlined in red for all of them, and when I hover over it, it says the namespace "Google" could not be found.

Any ideas of what I'm doing wrong?

Upvotes: 1

Views: 205

Answers (3)

Richard
Richard

Reputation: 109100

Use ildasm.exe (or better) Reflector to validate the namesapce names in the assembly.

Sometimes they are not what you expect.

Upvotes: 0

Andrew Hare
Andrew Hare

Reputation: 351566

You need to reference those assemblies in your project.

Go to Solution Explorer > right click on References > select Add Reference...

In the resulting dialog select the Browse tab and select your assemblies.

Upvotes: 4

Frank Schwieterman
Frank Schwieterman

Reputation: 24480

Thats Microsoft Visual Studio helping you out. Fixed below:

using Bing.GData.Extensions;
using Bing.GData.Contacts;
using Bing.Contacts;
using Bing.GData.Client;

Upvotes: -2

Related Questions