views:

45

answers:

1

I have my Sharepoint Server 2010 set-up and everything appears to be functioning correctly. However, when I attempt to create a console application on the Sharepoint server, I cannot find a reference to the Micrsooft.Sharepoint.dll. I manually browse to "c:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI", add the reference, but the following using statement fails.

using Microsoft.Sharepoint;

Is this because Sharepoint Foundation is not installed? Note: I have been successfully deploying sample web parts and silverlight tests using the Micrsooft.Sharepoint.Client.Silverlight.dll

+1  A: 

No, you don't have to install SharePoint Foundation separately.

It could be due to the "Target" setting for your project. Try setting the Platform target to x64 to make sure your app is running 64 bit and not as a x86 app. SharePoint 2010 is x64 so you can run it trouble trying to make API calls from a x86 app.

Hope this helps.

Greg
Thanks for the feedback- while that was not my issue, the problem was in the same place... the Target framework for the project was set to ".Net Framework 4 Client Profile". If I'm not mistaken, I believe I need to be developing against .Net 3.5 for this release of Sharepoint on the server. Thanks again!
mytwocents

related questions