Search code examples
c#asp.netbing-api

BING API, missing directive or an assembly


I have download the new Bing API C# file and added it to my ASP.NET web site, it works perfectly if uses ASP.NET MVC 2.0 but with simple ASP.NET website it shows an error on this line:

var bingContainer = new Bing.BingSearchContainer(new Uri("https://api.datamarket.azure.com/Bing/Search/"));

The error is:

Error 1
The type or namespace name 'Bing' could not be found (are you missing a using directive or an assembly reference?)
c:\Users\jawad\documents\visual studio 2010\WebSites\BingAPI\Default.aspx.cs

Any idea what I am missing?


Solution

  • 1) Verify you have the correct using statement for the API.

    2) Verify the API is referenced properly.

    3) Verify that your project and the bing api project (or .dll) both have the same .net version selected.