I installed SharePoint Foundation 2010 Client Object Model Redistributable with the intent of creating a basic console app to retrieve the site name as demonstrated in Using the SharePoint Foundation 2010 Managed Client Object Model article on MSDN.
In the section detailing how a developer creates a console application, the article creates the following code:
using System;
using Microsoft.SharePoint.Client;
class DisplayWebTitle
{
static void Main()
{
ClientContext clientContext = new ClientContext("http://intranet.contoso.com");
Web site = clientContext.Web;
clientContext.Load(site);
clientContext.ExecuteQuery();
Console.WriteLine("Title: {0}", site.Title);
}
}
My problem is that the namespace: Microsoft.Sharepoint.Client (squiggly underline underneath sharepoint) is not recognized. As a result, ClientContext and Web are not recognized. What do I do to get this to namespace to resolve?