Getting started with Windows Sharepoint Services 3.0 development with free tools

Posted on 03.05.10

0



To get started with Windows Sharepoint Services 3.0 (WSS 3.0) development download:

  1. VMware Server
  2. A trial of Windows Server 2008 R2
  3. Windows SharePoint Services 3.0 x64 with Service Pack 2
  4. Microsoft Visual C# 2010 Express

Then you need to:

  1. Install VMware Server on a computer with lots of memory
  2. Create a virtual machine for Windows Server 2008 R2
  3. Install Windows Server 2008 R2 on the virtual machine
  4. Install WSS 3.0 on Windows Server 2008 R2
  5. Install Microsoft Visual C# 2010 Express on Windows Server 2008 R2

Now that all the software and tools are set up it’s time to create the familiar “Hello world!” application:

  1. Start Microsoft Visual C# 2010 Express
  2. File → New Project… → Console Application → OK
  3. File → Save All
  4. File → Close Solution
  5. Open the file ConsoleApplication1.csproj with notepad
  6. Change the two occurences of <PlatformTarget>x86</PlatformTarget> to <PlatformTarget>x64</PlatformTarget>
  7. Change <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> to <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  8. Open the project again
  9. Project → Add Reference… → Browse → C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll → OK
  10. Add the code below and hit F5
using System;
using Microsoft.SharePoint;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var url = string.Format("http://{0}", Environment.MachineName);
            using (var site = new SPSite(url))
            {
                Console.WriteLine("Hello {0}!", site.OpenWeb().Title);
            }
        }
    }
}

Ignore the compiler warnings for now.

This will get you started. More details to come.

A final note. If you don’t set the platform target to x64 you will get a System.IO.FileNotFoundException with the message:

The Web application at http://hostname could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

Advertisements
Posted in: Uncategorized