Friday 5 November 2010

Console Applications and SharePoint 2010

Recently I tried to create a Console Application that accessed a SharePoint 2010 site. I could not get the application to run. I'd added a reference to Microsoft.SharePoint.dll and included Microsoft.SharePoint as a using clause. After some head-scratching I realised that the following project settings were required.

Application | Target framework = .Net Framework 3.5
Build | Platform target = x64

BTW, The SharePoint dlls can usually be found in the following folder:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

No comments:

Post a Comment