Welcome to MSDN Blogs Sign in | Join | Help

Paul Andrew

Microsoft Technical Product Manager for the SharePoint Developer Platform
SharePoint Developer MSDN Web Cast Series

We're doing lots of things around introductory SharePoint development for .NET developers over the next few months. Here is the schedule for a series of MSDN web casts on 10 introductory SharePoint development topics for .NET developers. If you are a .NET developer then chances are these are the most interesting ten introductory things you can do on SharePoint Products and Technologies.

Each MSDN Web Cast is an introduction for .NET Developers to SharePoint and the Topic. You need to register for the web cast by clicking the link and entering some details. Then you get emailed a link to sign on and participate in the web cast on its date and time.

Date

Topic and Signup URL

Presenter

May 20th 9AM PST

Web Parts

Robert Bogue

May 21st 9AM PST

Data Lists

Robert Bogue

May 27th 9AM PST

Silverlight

Andrew Connell

May 28th 9AM PST

Event Handlers

Andrew Connell

June 3rd 9AM PST

Page Branding

Andrew Connell

June 4th 9AM PST

Workflow

Robert Bogue

June 10th 9AM PST

Web Services

Andrew Connell

June 11th 9AM PST

Page Navigation

Andrew Connell

June 17th 9AM PST

User Management

Robert Bogue

June 18th 9AM PST

Content Types

Robert Bogue

Each MSDN Web Cast is recorded for later viewing which should be through the same registration URL.

Announcing: Visual Studio extensions for SharePoint – Developer User Guide

I'm pleased to announce the release of the User Guide, Samples and Walkthroughs for the Visual Studio 2005 extensions for Windows SharePoint Services 3.0, v1.1. The Visual Studio 2005 extensions for SharePoint were released back in Feb 2008 and an update for Visual Studio 2008 is planned for release in June 2008.

The user guide is downloadable here and represents approx 200 pages of documentation applicable to both the 2005 and the 2008 release of the Visual Studio extensions for SharePoint. The user guide contains an introduction to using the Visual Studio extensions for SharePoint, and it contains walkthrough samples for each of the project templates that are supplied with the Visual Studio extensions for SharePoint. These are the document sections:

  1. Starting out in SharePoint Development
    An introductory guide.
  2. Walkthrough of the VSeWSS User Interface including the WSP View
    A description of the user interface elements. The WSP view is a new tool panel which helps you put together the deployment package for SharePoint projects.
  3. The Team Site Project
    A walkthrough and complete sample.
  4. The Blank Site Project
    A walkthrough and complete sample.
  5. The List Definition Project
    A walkthrough and complete sample.
  6. The Web Part Project
    A walkthrough and complete sample.
  7. The Workflow Projects
    A walkthrough and complete sample for each of Sequential and State machine workflows. Although these project templates are not shipped with VSeWSS we added them for completeness. They are included in Visual Studio 2008 and are available for Visual Studio 2005 in the Windows SharePoint Services SDK.
  8. Project Item Templates
    A description and usage for each of the project item templates. Essentially the project templates are largely empty templates with default project items contained.
  9. Best Practices with VSeWSS
    A collection of suggestions for working with the tool.
  10. Changes from 1.0 to 1.1
    A list of what was improved. There were lots of improvements from V1.0 of VSeWSS

     

Here's what the default install directory looks like on my machine. I'm running Windows Server 2008.

Once you unzip the Samples you can see these sub directories. Each sample is a completed example which the User Guide contains a walkthrough (similar to a Hands-on Lab) for. Each sample is in both C# and VB.NET.

To use this user guide you will need the following on your machine or on a Virtual PC image.

  1. Windows Server 2003 or Windows Server 2008
  2. .NET Framework 3.0 – no charge download
  3. Visual Studio 2005 Professional or greater – trial available
  4. Windows SharePoint Services 3.0 SP1 – no charge download
  5. Windows SharePoint Services SDK 1.3 – no charge download
  6. Visual Studio 2005 extensions for .NET 3.0, Windows Workflow Foundation – no charge download
  7. Visual Studio 2005 extensions for Windows SharePoint Services 3.0, v1.1 – no charge download
Getting Started with SharePoint Development

How do I get started working as a Professional Developer on SharePoint? Here's a brief outline of the options.

First you need to have prerequisite skills in .NET Development and in particular ASP.NET Development. SharePoint is built on those technologies and most everything you do in SharePoint is using .NET and ASP.NET with additional functionality, and additional API's.

Go on a Training Course

When I started out on SharePoint as an experienced .NET developer I realized there is lots of new stuff to learn. The first thing I did was attend The Great SharePoint Adventure course by Ted Pattison Group. The trainer for the week long course was Andrew Connell.

Ted Pattison GroupThe Great SharePoint Adventure
MindSharpDevelopers Guide to Windows SharePoint Services
AppDev - FREE Sample Microsoft SharePoint 2007 for Developers Training CD

Online Microsoft eLearning Training – Free for a limited time

A great starting place is to take an online course.

WSS Development
MOSS Development

Read Books

Here's some great books on SharePoint development. There are plenty more available at the online book stores so make your own choice.

Inside Windows SharePoint Services 3.0
Inside Microsoft Office SharePoint Server 2007

Get Certified – Take an Exam

There is SharePoint developer certification for both WSS and MOSS.

70-541 TS: Microsoft Windows SharePoint Services 3.0 – Application Development
70-542 TS: Microsoft Office SharePoint Server 2007 – Application Development

Write Your First SharePoint Program

To write SharePoint code you need:

  1. SharePoint installed on your local development machine and this means you need to run Windows Server 2003 or Windows Server 2008. VPCs are available here. There is a SharePoint one, or you can get a smaller base and add WSS or MOSS to it.
  2. Get Visual Studio 2005 Professional or above, the Visual Studio 2005 extensions for Windows SharePoint Services 3.0, v1.1 and the Visual Studio 2005 extensions for Windows Workflow Foundation (Visual Studio 2008 support is planned for June 2008).
  3. Get the WSS SDK and the MOSS SDK. They are also available online for WSS and MOSS.
  4. Start Visual Studio on your Windows Server machine that has SharePoint installed and create a new Windows Console Application. Yes there are SharePoint project templates, but I'm going for a fast first SharePoint program here and we don't need them yet.
  5. If you are on Windows Server 2008 then make sure you started Visual Studio by right click and run as administrator.
  6. Add a reference to Microsoft.SharePoint.dll (shown in references as Windows SharePoint Services)
  7. Add a using Microsoft.SharePoint
  8. Add this code:

        static void Main(string[] args)

        {

            // Update to your server name

            SPSite siteCollection = new SPSite("http://localhost");

            SPWebCollection sites = siteCollection.AllWebs;

 

            foreach (SPWeb site in sites)

            {

                SPListCollection lists = site.Lists;

 

                Console.WriteLine("Site: {0} Lists: {1}",

                    site.Name, lists.Count.ToString());

 

                foreach (SPList list in lists)

                {

                    Console.WriteLine("List: {0} {1}",

                        list.Title, list.ID.ToString());

                }

 

                site.Dispose();

            }

 

            siteCollection.Dispose();

            Console.WriteLine("Press ENTER to continue");

            Console.ReadLine();

        }

    9.    Run it with F5

This is all also described here in the WSS SDK.

Join the Discussion and Ask Questions on the MSDN Forums

This is a great place to search for answers, or to ask questions yourself, or to answer other people's questions. The SharePoint Developer and Programming forum is pretty active.

SharePoint Development and Programming Forum

Watch WebCasts

For WSS (the basic SharePoint API stuff) there are many on MSDN under Getting Started and under Learn.
For MOSS there's also Getting Started and Learn material.

Try Virtual Labs Online

Creating a SharePoint Workflow

More SharePoint Developer Virtual Labs coming in June 2008.

Spend time on MSDN

There are separate sections for WSS and MOSS so you need to go to both.

http://msdn.microsoft.com/sharepoint - For WSS
http://msdn.microsoft.com/en-us/office/aa905503.aspx - For MOSS

Check Out More Online Resources

Here's an introductory talk I gave at SharePoint Connections, Spring 2008.
http://blogs.msdn.com/pandrew/archive/2008/04/21/sharepoint-connections-talk-on-visual-studio-2005-extensions-for-sharepoint.aspx

Here's a Microsoft Learning Class Material which could be offered by a certified trainer:
50064 – Advanced SharePoint Developer course

Online Microsoft eLearning links are here:
http://www.microsoftelearning.com/catalog/developer.aspx#SharePoint

More developer resources here:
http://www.microsoft.com/sharepoint/learning/resources.mspx     

Microsoft Developer Evangelist Lynn Langit:
http://blogs.msdn.com/socaldevgal/pages/sharepoint-2007-developer-resources.aspx

David Isbitski - SharePoint Development - Making Sense of it all

Watch Davids take by screencast on SharePoint Development

Part 1 - http://channel9.msdn.com/Showpost.aspx?postid=373280

Part 2 - http://channel9.msdn.com/Showpost.aspx?postid=373289

In the video he's using the Visual Studio 2005 extensions for Windows SharePoint Services.

Pegasus Imaging Releases Workflow Activities for WF and SharePoint

If you are involved in document imaging with SharePoint or on a Windows Workflow Foundation application that you are building then this may be useful.

Pegasus Imaging has released a set of WF activities compatible with Windows Workflow Foundation and with Microsoft Office SharePoint Server 2007 workflow that help with scanning and processing documents which can then be auctioned on by other parts of the workflow.

Details are here.

Choosing the right workflow tool for your project

Kris Horrocks and I gave a talk about this at TechEd US last year. The talk described a dozen different scenarios where you need some enterprise application integration and workflow. For each scenario we discuss different types of customer needs and whether BizTalk or WF would be a better solution. Recently Kent Brown wrote a whitepaper based on the talk which is published here:

http://msdn2.microsoft.com/en-us/library/cc303238.aspx

Values possible for PropertyName in SPMobileFieldPropertyLabel for SharePoint mobile development

I was recently asked what the valid values are for this property. This is what I heard back from the development team. Hopefully it is useful to some other SharePoint developers also.

SPMobileFieldPropertyLabel Members (PropertyName and FormatString)

PropertyName

The possible values for this property are the followings:

  • "Type"
  • "InternalName"
  • "Title"
  • "Description"
  • "DefaultFormula"
  • "DefaultValue"
  • Other field attributes defined in schema.xml as follows:

     

<Fields>
    <Field ID="FID_Body" Type="Note" RichText="TRUE" RichTextMode="FullHtml" IsolateStyles="TRUE" NumLines="15" Name="Body" DisplayName="Body" Sortable="FALSE" />
</Fields>

If the schema.xml for the current list contains above field definition, the below property names can be used.

  • "ID"                    // "FID_Body: " is rendered.
  • "Type"                  // "Note: "     is rendered.
  • "RichText"              // "TRUE: "     is rendered.
  • "RichTextMode"          // "FullHtml: " is rendered.
  • "IsolateStyles"         // "TRUE: "     is rendered.
  • "NumLines"              // "15: "       is rendered.
  • "Name"                  // "Body: "     is rendered.
  • "DisplayName"           // "Body: "     is rendered.
  • "Sortable"              // "FALSE: "    is rendered.

 

Please refer to Field Element (List – Definition) for more detail.

FormatString

The default value specified in MobileDefault.ascx is "{0}: ".

This string is passed to System.String.Format() method along with the property value in order to generate the string to render.

e.g.

System.String.Format("{0}: ", "Body");  // "Body: " is rendered.

SharePoint Connections Talk on Visual Studio 2005 extensions for SharePoint

I did my first public talk on SharePoint today :-) I'm here at the SharePoint Connections Spring 2008 conference. My talk was mostly a long demo showing how to use the Visual Studio 2005 extensions for Windows SharePoint Services 3.0, v1.1. The demo outline is:

  • Build a Content Type
  • Build a List Definition
  • Build an Event Receiver
  • Build a Template
  • Build a Custom Action
  • Build a Web Part
  • Use them all in a SharePoint Site
  • Show WSP View in Visual Studio
  • Show SP Solution Generator

Here's what the Visual Studio 2005 Solution Explorer looks like after the demo is complete.

SharePoint in Visual Studio

I've attached the PPT of the talk, the Demo Script and the few starter files required. I'll try to get a video recording of the talk in the next week or two.

SharePoint SDK Additional Detail Being Added

We have been working to get more detail in the SDK for Microsoft SharePoint Products and Technologies. To use this additional documentation you have to use the online documentation rather than the downloaded WSS SSDK and the MOSS SDK.

We will also work to get this included in the downloaded SDK, and we will keep working on getting more detail in the SDK, for now here's a list of the new material so far. Scroll down to the "Community Content" in each article to see the new detail.

Classes

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.toolbar.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spcontrolmode.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spdatepickercontrol.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.cssregistration.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spboundfield.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.peopleeditor.accounttype.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.dvdropdownlist.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.encodedliteral.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.newmenu.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.welcome.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.monthlycalendarview.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.search.query.keywordquery.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.search.query.fulltextsqlquery.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.search.query.query.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.search.query.resulttable.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.search.query.resulttablecollection.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.search.query.resulttype.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.workflowactions.createtaskwithcontenttype.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.workflowactions.workflowcontext.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.workflowactions.sharepointsequentialworkflowactivity.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowstatus.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowassociationcollection.configuration.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.settingsmenu.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.actionsmenu.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.uploadmenu.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spencodemethod.aspx

 

Methods

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.sendemail.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.redirect.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.getallauthenticatedusers.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.resolveprincipal.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.ensureauthentication.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.getaccountname.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.getfullnameandemailfromlogin.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spcontrol.setcontextweb.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spcontrol.setcontextsite.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spcontrol.getcontextwebapplication.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spgridview.onrowcreated.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spgridview.ondatabound.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spdatasource.getview.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spfile.sendtoofficialfile.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spfile.schedulestart.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.itemfileconverted.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.splist.getdistinctfieldvalues.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.validatesecurityonoperation.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.createnewdiscussion.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.transfertoerrorpage.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.transfertosuccesspage.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.handleaccessdenied.aspx

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.getlocalizedstring.aspx

 

Hope this helps

SharePoint does support .NET Framework 3.5

Yes, SharePoint does support .NET Framework 3.5 on the machine so you can use the latest .NET features in your SharePoint application. You can get confirmation on TechNet here.

SharePoint is a Great Development Platform

I think it's great because it extends .NET with the same API's and the same Developer Tools. It's great because it has lots of end user functionality out of the box for developers to extend. It's great at being an Office content server and integrating with Word, Excel and other client applications. It's great because it offers an enterprise capable web application development environment.

My opinion, maybe I'm biased, but this guy doesn't work for Microsoft. He's got the right idea:

http://www.charliedigital.com/PermaLink,guid,d06bde93-9fa9-4381-af42-0ee9d1330d63.aspx

Moving to Windows Server 2008

Now that I'm working full time on SharePoint I wanted to move my environment to be more in line with SharePoint. What does this mean? SharePoint doesn't install on Windows Vista which I've been using for my two work machines so I've gone and reinstalled with Windows Server 2008. Here are the two machines I have:

  1. Lenovo T60P Laptop – 3GB RAM, 90Gb HDD, Intel T7400 2.16Ghz CPU
  2. Dell Precision 450 – 2Gb RAM, 72Gb HDD, 2x Intel Xeon 3.06Ghz CPUs

I installed Windows Server 2008 32 bit on both of them but I still wanted my machine to look like Windows Vista. Yes, I know these are Server OS's for Servers – but my job is on a Server product that requires a Server OS so that's what I want to run. Choosing Windows Server 2008 as your workstation install really requires an MSDN Subscription this is because the OS license for Windows Server 2008 is quite a bit more than Windows Vista but your MSDN Subscription will take care of that. These are two great resources that I used to make my install more like a workstation:

On Installing SharePoint

For SharePoint I needed to install SQL Server 2005 Developer Edition SP2, then Visual Studio 2005 SP1 both which require licenses. And then Windows SharePoint Services 3.0. I grabbed the downloadable that includes WSS v3.0 SP1 already integrated. When I installed WSS I chose custom install and specified a Web Front End only – this allows me to choose the SQL Server install instead of the internal database that a Stand Alone install goes with. This was important to me because I *might* want to view the database using SQL tools and the internal database isn't accessible.

Alternatively to WSS, I could have installed MOSS. The one with integrated SP1 for installing on Windows Server 2008 is here. You can run as Eval for 180 days with a key that's provided on the download page.

Next I needed the Visual Studio 2005 extensions for Windows Workflow Foundation and the Visual Studio 2005 extensions for Windows SharePoint Services. And I also installed the WSS and MOSS SDKs.

I made one config change on the machine for SharePoint and that is to open the C:\Inetpub\wwwroot\wss\VirtualDirectories\80\web.config and search for debug. I set it to true so that the Visual Studio debugger will attach automatically.

Next I installed all my other regular apps like Microsoft Office 2007, Virtual PC, Filezilla and a couple of Email compression add-ons.

Problems I Had

Even after following these guides there were still some things that didn't work how I liked.

  1. The first thing I didn't like was that I could not get Lenovo's excellent System Update utility to run on Windows Server 2008. It's just a tool that connects to their web site and gives you a list of drivers and apps that have newer versions for your laptop. So I had to do all this manually, no big deal I just really like that that app.
  2. Another was burning DVD's. I resolved this by using DVDBURN which is available from a Windows Resource Kit and is used to burn an ISO to a DVD. Then I got an ISO creating tool.
  3. Moviemaker is also missing. I even copied the binaries for this over from a Vista machine I have and it didn't work. So because of this I created a new 12Gb partition on my HDD and installed Vista. I was surprised how easy it was to repartition the drive in Windows Server 2008, I just ran the Computer Management in Administration tools, clicked on Disk Management and followed my nose.

Other Tips

I updated Windows Search to the new Windows Search 4.0 Preview. Really nice perf here.

One of the tips in the guides I linked to is to enable the Themes service so you can get the Vista round start button. I leave the Themes service set to manual. I turn it on when I want the Vista look and feel (I like the round button), otherwise it stays off.

New Guidance Article on SharePoint Security for Developers
Reza Alirezaei has just had published a great overview of security considerations for SharePoint Developers. Looks like a good resource that I can refer people to on the SharePoint MSDN Developer Forums. BTW You're invited to come help answer questions on the forums too!!!
Presenting on SharePoint Developer with Visual Studio 2005
I have a talk next week at SharePoint Connections 2008. I'll be talking on SharePoint Development using Visual Studio 2005 and the Visual Studio 2005 extenstions for Windows SharePoint Services. It's over in Orlando, Florida. Here's a link to the sessions. Register here.
More on Silverlight in SharePoint

If you're trying out Silverlight for Web Parts in a SharePoint application then you will have downloaded the Silverlight Blueprint for SharePoint. We are working on some more material to teach the basics. In the mean time there are a couple of great blog posts out there.

One here from Patrick Tisseghem who did most of the work on the blueprint.

One here from Ian Morrish who runs the online demo site for SharePoint. Ian's post is aimed at installing and using the blueprint samples without being a developer and without building the source yourself.

More Posts Next page »
Page view tracker