To get started with Windows Sharepoint Services 3.0 (WSS 3.0) development download:
- VMware Server
- A trial of Windows Server 2008 R2
- Windows SharePoint Services 3.0 x64 with Service Pack 2
- Microsoft Visual C# 2010 Express
Then you need to:
- Install VMware Server on a computer with lots of memory
- Create a virtual machine for Windows Server 2008 R2
- Install Windows Server 2008 R2 on the virtual machine
- Install WSS 3.0 on Windows Server 2008 R2
- 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:
- Start Microsoft Visual C# 2010 Express
- File → New Project… → Console Application → OK
- File → Save All
- File → Close Solution
- Open the file
ConsoleApplication1.csprojwith notepad - Change the two occurences of
<PlatformTarget>x86</PlatformTarget>to<PlatformTarget>x64</PlatformTarget> - Change
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>to<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - Open the project again
- Project → Add Reference… → Browse →
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll→ OK - 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.
Advertisement
Posted in: Uncategorized
Posted on 03.05.10
0