Skip to content

Instantly share code, notes, and snippets.

@vgrem
Created May 20, 2013 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgrem/5612748 to your computer and use it in GitHub Desktop.
Save vgrem/5612748 to your computer and use it in GitHub Desktop.
CS-Script: Hello world for SharePoint
//css_host /version:v3.5 /platform:x64;
//css_dir C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI;
using System;
using Microsoft.SharePoint;
namespace CSScript4SP
{
class Program
{
static void Main(string[] args)
{
using (var site = new SPSite("http://intranet.contoso.com"))
{
using (var web = site.OpenWeb())
{
Console.WriteLine("Hello SP!");
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment