Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to use Sharepoint Client Object Model for a Windows Application? If yes then how to do it? Thanks in advance...

share|improve this question
    
Based on your comments it looks like you are trying to use types from the Server Object Model, not the Client Object Model. Check the types you are using - if the type name is prefixed with SP or the type is in the Microsoft.SharePoint namespace it's from the Server Object Model –  Rob Windsor Aug 22 '12 at 12:04
    
I wrote a course for Pluralsight on how to use the Client Object Model. You can get a free trial subscription and check it out: pluralsight.com/training/Courses/TableOfContents/… –  Rob Windsor Aug 22 '12 at 12:06
add comment

3 Answers 3

up vote 0 down vote accepted

Yes, it is possible; and you do it the same way you would create any other Windows application, including the relevant references and writing the code.

share|improve this answer
    
I've already tried that.But it didn't work.Getting the following error :- "The type or namespace name 'Sharepoint' does not exist in the namespace 'Microsoft'" though I've added references to Microsoft.Sharepoint.Client and Microsoft.Sharepoint.Client.Runtime –  DeathRider Aug 22 '12 at 10:51
    
@DeathRider are you using .NET 3.5 in 64bit mode? If you post code, we may be able to help more, but it does sound like a configuration issue. –  TZHX Aug 22 '12 at 11:30
    
Thanks TZHX.Thanks a lot...:) –  DeathRider Aug 22 '12 at 11:39
add comment

As stated by TZHX you can, please refer to these for help:

msdn wiki

http://msdn.microsoft.com/en-us/gg620623

this is an example using the client side object model example

http://www.codeproject.com/Articles/399156/SharePoint-2010-Client-Object-Model-Introduction

and another example

http://weblogs.asp.net/shailesh/archive/2010/07/07/sharepoint-2010-introduction-to-client-object-model.aspx

the paths to dll's are:

Path to get DLL's: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

share|improve this answer
    
Thanks to you too...:) –  DeathRider Aug 22 '12 at 11:39
add comment

Finally, I'm able to fix the problem.I missed out one very small but crucial thing.My Target Framework was set to '.NET Framework 4' which should be '.NET Framework 3.5'.Changed it accordingly and it has started working.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.