SP 2010 Development Starting Point
-
Monday, May 07, 2012 12:09 PM
Hi Friends,
I am trying to run a console c # app for sharepoint.
Please assist with a good starting point.
I am alien to sp & any other development.
may be a step by step hellow world program or slightly more i am looking at for now.
Rgds, Minesh
All Replies
-
Monday, May 07, 2012 12:15 PMAnswerer
Hello,
you have a lot of good tutorial here
http://msdn.microsoft.com/en-us/library/ee330921.aspx
http://msdn.microsoft.com/en-us/library/ff598601(Office.14).aspx
-
Monday, May 07, 2012 1:41 PM
Hey,
Here you will get 101 sample codes provided by Microsoft.
http://code.msdn.microsoft.com/sharepoint/SharePoint-2010-101-Code-da251182
You can download it at your end and you can explore it :)
Let me know if you have any queries :)
"The Only Way To Get Smarter Is By Playing A Smarter Opponent"
-
Tuesday, May 08, 2012 7:44 AM
Thanks, anything specifically for console c # app for sharepoint,
also i wish to have a step by step or explained codes
Rgds, Minesh
-
Tuesday, May 08, 2012 8:03 AM
- Create a new console application.
- Set a reference to Microsoft.SharePoint.dll located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.SharePoint.dll
- Add the following code and you're of to a good start:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { using (var site = new SPSite("http://astro")) { using (var web = site.OpenWeb()) { } } }}}
Remember that the console app needs to run on a server with SharePoint installed, otherwise you can't use the server object model.
Also make sure to check out: http://social.technet.microsoft.com/wiki/contents/articles/8666.sharepoint-2010-best-practices-en.aspx
Kind regards,
Margriet BruggemanLois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com
- Edited by Margriet Bruggeman Tuesday, May 08, 2012 8:03 AM
- Proposed As Answer by Thomas BalkeståhlMVP Tuesday, May 08, 2012 8:44 AM
- Marked As Answer by MineSharePoint Tuesday, May 08, 2012 9:15 AM
-
Tuesday, May 08, 2012 8:44 AM
Hi Minesh.
I would say go with Margriet's suggestion, if you have to use a client (with no SharePoint server on it) to run the console app, then you will have to resort to the COM, Client Object Model for SharePoint. The links below provide a good base to work from in regards to the client Object Model and how to use it.
SharePoint 2010 Client Object Model
http://msdn.microsoft.com/en-us/library/ee537247.aspxClient Object Model Resource Center | SharePoint 2010
http://msdn.microsoft.com/en-us/sharepoint/ff770207Using the SharePoint 2010 Client Object Model - Part 1 (its old but useful)
http://blogs.technet.com/b/speschka/archive/2009/11/01/using-the-sharepoint-2010-client-object-model-part-1.aspxThomas Balkeståhl - Technical Specialist - SharePoint - http://blog.blksthl.com
Download the SharePoint Branding Project here- Marked As Answer by MineSharePoint Tuesday, May 08, 2012 9:15 AM

