bkir knk
bkir knk

Reputation: 29

C# YouTube API Errors

When I want to write code with the YouTube API, I get these errors in namespace:

using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;

Error 1 The type or namespace name 'v3' does not exist in the namespace 'Google.Apis.YouTube' (are you missing an assembly reference?)

Error 2 The type or namespace name 'v3' does not exist in the namespace 'Google.Apis.YouTube' (are you missing an assembly reference?)

It seems these "v3" tags do not exist, so please help me.

Upvotes: 1

Views: 297

Answers (1)

Cory
Cory

Reputation: 793

In order to make sure you have the correct libraries and dependencies, try downloading the Google.Apis.YouTube.v3 Client Library through NuGet. Here is what you do:

enter image description here

and then enter Install-Package Google.Apis.YouTube.v3 into the console and press enter. You should see something like this:

enter image description here

After the install completes, the references should have been added to the project that you have open and all you need to do is add your using statements:

using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;

Upvotes: 2

Related Questions